Hamiltonian Dynamics and Morse theory