js: Add DC motor and restructure motor classes