Dynamics of Small Solar System Bodies and Exoplanets