MOTOR_ functions moved to separate files; timer routines for motor run added