Updated comments and code for motor control

I added back some code I had previously removed.