If it is your opinion that this was the work of some penny-pinching property manager, who just hired some unlicensed gypsy to circumvent the rules....pull it all out, take a permit, install it right....and charge him prime rate! Having to pay three times for the job might make him think twice the next time he takes a short cut.
As for your buddy the other contractor- explain to him that you put your butt on the line for no one, and that you are RUNNING away from such work, if you can't get it done right. For all you know, your buddy was the one taking the short-cuts.
It also is worth considering getting some money up front. You work for pay, not argument.