Higher level API for motors added.

+ some minor fixes.