Refactor code for use with ESC controllers and brushless motors.