clean up the code

everything is moved to motionctl class