Added motor functionality and direction determinations. Compiled with no errors.