Dynamics and Masses of Astronomical Bodies