About that door latch switch: You can remove it, the switch plays no role in the operation of the machine. Those switches were monitored externally by the casino, as your machine was fitted with other, non-essential wiring and switches. I have 20 of those same machines, all fitted with extra wiring, so I put them all on a diet and removed quite a bit of wiring, connectors and switches. Machines work fine without that stuff. Also, I never have needed or used those external reset keyswitches; they are only there for casino audits.
About the code 50: If you open the door, the code is set and visible as soon as you close it again. If the hinge switch makes normal contact with the hinge, it's possible the wiring on the switch is wrong. You must get that code 50 when the door opens and closes. Check the spade terminal connectors; one might be in the wrong place.
There is a ground wire on one of the connectors on top of the IO board. It is a short piece of wire with a spade terminal on it, attached to the bracket mounting screw. You should cut that wire and remove that ground; it allows you to test the operation of your machine with the door open, while tripping the coin switch quickly, you can simulate coins-in. With the ground attached, you'll set a tilt code.
If your problem follows the reader, it's time to replace or repair that reader.