Moved motor control to separate classes