Fix bug with motor direction

Under a certain condition the actuator would be moved in the wrong
direction. The funny appeared when input degrees was lower than input
distance.
Improve movement precision

Use of floats instead of ints makes for more accurate movement.

However, the precision can further be improved by having finer control
over the motor speed.
Code cleanup