Mechanics, integrability and control