It's a little late to change my code now, but I wonder if it might be done with functions to do away with redundancy.
Still, if you have 3 gamepads connected with numbers 00,01,02 and gamepad 01 is unplugged, a lot of "Repeat GamePad.GamepadCount times" conditions will break. I'm not sure if gamepad numbers are reassigned when a gamepad's USB is yanked out.
Anywho, I'll let you know if I find anything. Maybe someone else has an idea and will chime in as well!