Writing comments explaining the motion code