Setting up the motor control