Invariant Tori and Cylinders for a Class of Perturbed Hamiltonian Systems