W algebras and integrable structures