When you figure out what wire goes where (can't read wiring diagrams?!) take the battery earth lead off. Follow it back and take the wire completely off the car.
Clean each terminal back to shiney metal with some coarse sandpaper etc. Then do the same with the parts it contacts the body and gearbox.
Refit it and smear the contacts and battery terminal with vaseline.
The wiring on headlamp bulbs usually melts the plug because of poor earth connections, by doing this you will stop it happening again. The vaseline stops the terminals corroding as fast but doesn't affect the connections like grease or copper grease would.