Some problems fixed in motor API
First steps in PWM control