Clebsch potentials and variational principles in the theory of dynamical systems