Motor Controller Functions

Functions for the motor controller.
Motor Controller Function
Getting rid of old motor controller code.