I'm glad you got it going!
BUT...
Plugging/unplugging a rotary attachment while the machine is on is a very bad thing.
Had this been a stepper motor and was energized, you would have blown the motor driver board. Thus why I mentioned "... with power off..."
I was going to wait till you got the rotary attachment issue resolved, then mention the limit/homing switch.
Be sure to check *ALL* wiring and cables in the system. If two somewhat major things were faulty, who know what else is too, including the laser.
Personally, I'd shut down operations for a day, do a complete PM (Preventive Maintenance) on the system. Clean, lube, rotate the tires, check belts, bearings, loose screws, alignments, etc.