Well, I figured out part of the problem. To eliminate the ghosting issue I added GPIO=%000000 in the main part of the program after the TRISIO= noghost. That seemed to eliminate the odd LED lighting up willy nilly.

What I don't understand is why I can't do ICSP under battery power. Initially the voltage was a couple of hundred millivolts higher than the power supply but after running this for a week or so the voltage is now around 4.6VDC. Program will run but I have to hook it up to the power supply to program it.

As usual your thoughts are appreciated.