started the cleaning up of the code. control_motion and adding some other features