Others have provided a lot of answers for you but I'd like to add a general guideline. If wires get hot enough to melt or burn, there's a major problem somewhere. Whenever this happens you should shut everything down, disconnect any power sources (like the battery), and start checking everything. Don't bother turning anything back on until you find a real problem that's been fixed, or you'll just burn up more wires (as you apparently found out).
Hope you find your problem soon!
