refactoring existing motor control code. added car class.