Completed Motor class (minor fixes)

Includes an awkward function named "checkIfInverted()".