changes to motor library

Fork of motor by GDP 4