Thanks for answering my questions.
If this were me, I'd start from the beginning and completely retrain the dog to solve this problem. I would establish a routine in which the dog is ushered outside as soon as he wakes up in the morning, after meals, after playtime, and before bed. I would praise the dog every time he does his business outside. If you catch the dog in the act inside, you can clap your hands loudly to startle and distract him long enough to grab him and take him outside. The minute he goes to the bathroom outside, give lots of praise and a treat.
If he tends to sneak off to use the bathroom in the house where you can't see him, then you may want to use a leash in the house to attach him to you so that he can't sneak off. A bell on his collar can also be used so that you know where he is, but in my experience I tend to block out the sound of the bell after a while.
Accidents will happen during the retraining process, but it's important to not become angry or frustrated. When you vent these types of emotions, training stops and your dog becomes fearful or confused. It's also futile and silly to punish the dog when he makes puddles or defecates in the house. All he'll learn to do is to do his business secretly or when the owner isn't around to catch him.
Another step I'd take is to completely and thoroughly clean all the carpeting with an enzyme based product that destroys the protein molecules in urine and feces rather than using the products that you're currently using, as they seem to just cover the smell up. There are many cleanup products on the market that work this way..just make sure to not pick a product that contains ammonia, since it smells enough like urine to actually attract the dogs back to the scenes of their crimes. There are some great pretty inexpensive products available such as Oxyclean or other oxygen based cleaners.
Is is possible that he just needs a little 'help' to get over his substrate preference (where a dog likes going to the bathroom and where they're used to going is called a substrate preference and since he was a rescue dog, he may have never been taught not to go to the bathroom in the house...).
A couple things you could try would be:
Melantonin is an over-the-counter drug that can be used to treat some anxiety issues in dogs. The dose you would give would be up to 3 mg given orally whenever necessary up to every 8 hours. More information can be found here: http://www.petplace.com/drug-library/melatonin-melatonex/page1.aspx , which includes risks, warning signs to watch out for and other bits of useful information.
Try a DAP collar. These are collars that are impregnated with a man-made version of the dog appeasing pheromone, which is a pheromone that nursing bitches give off to their pups to help them feel calm and secure. It's something that humans can't smell, but it has an amazing effect on dogs with anxiety and other issues. Although you can find them at your vet's office..you can also find them online at places like Amazon.com and Ebay for much cheaper. Just make sure they're DAP brand, as they seem to work better than some other versions.
Sometimes these rescue dogs just need a little help calming down and figuring out where they're supposed to be doing their bathroom breaks. I used the collar on my rescue dogs and within a week or so he had stopped making poop art in his kennel.
Finally, if all else fails, you may want to invest in a product called a 'belly band', which is essentially a band that goes around their waist and over the sheath/penis area that doesn't allow them to mark. You use a feminine pad inside the band and that collects the urine that would normally be all over the house. I've used belly bands a couple times in my rehabilitation dogs with good results. You can find them at most petstores (such as Petco or Petsmart) and even online.
I hope this helps.