My tail light harness was a mess too. I bought a new rear harness from Scotts in Penhold, cleaned the sockets real good, and then replaced the center harness from a few inches out of the firewall and all the way down the frame to the rear harness.
The center harness only has 4 wires that go to the rear of the truck so I just went over to my local FLAPS and bought about 15 feet of 4 wire RV trailer harness & a trailer 4 pin flat connector. Connected the center to rear harness with the connector and problem solved. Cheap & color matched wiring.