Hello, and thank you for allowing me the opportunity to help you. If I am not online when you are, please allow me time to return. You may have two separate issues going on here. For the rough idle start by cleaning the throttle body. If you do not know what this is then I can walk you through it. Replacing the battery will reset the position of the throttle plate and if it is dirty this can choke the engine of air at idle. If that does not help then you may have a vacuum leak some place. As for the strange electrical issues first make sure you have the right battery. If the battery is not large enough for the battery then this will occur. If the battery is fine then you may have a programming problem with the a/c module. This happens often with a lass of power. You can remove the HVAC fuse for about 5 minutes and then replace it to see if it helps. If it does not then the system grounds should be checked, which I can tell you where those are. If the problem remains then you may need to go to the dealer for programming.