Integrated gearhead and motor