The Geometry of Hamiltonian Systems