Added moveToPoint function.
Also formatted.