Cleaned up motor library. Still WIP.