full refactor of Motors.py