One thing you have to do for sure, is to get a good carpet cleaning company in there. Call around, there are usually some that are realllll familiar with cat spray problems and how to go about cleaning it up. If even a hint of the smell is there they will continue to do it. Especially if they aren't fixed.
If there is a wood sunfloor under the carpet, you may need to even pull the carpet back and cover the area with a good sealer like Binz or Kilz. Abit of lemon mixed with water in a squirt bottle usually works pert well to put a cat in 'scoot' gear.

Some lemon pledge squirted in areas you want to keep a cat OUT of usually works well also.
You might talkt to your vet about removing the gland that male cats have as well. It excretes a hormonal based something or other and that is what makes the "urine" spray smell so terrible. It's some sort of oil based stuff to help insure the 'territorial marking' stays as long as possible. Sorry I don't know more details on that. I have a friend that is a vet tech and she has talked about that sort of thing before.