Sometimes it's not the problems you point out, but how you point them out. (Not saying that this is what is happening in OP's case, since it's hard to judge from a paragraph or two.)
If I were on-staff, I'd be the most senior programmer, and I'd be the first person to last more than 2 years in a long time. I think the freelance arrangement actually helps insulate me a lot from the weird culture of the company. I've been on the project the longest, and I have more experience than any of their other developers combined.
I also charge more than twice what they pay them, combined. Which is still not a lot. Turns out they hire these people off of Craigslist and then don't pay them very well.
So why don't you do what you paid for which is also to clean up code? I ask this because I'm a low rate programmer who usually know someone like you. Programmer like me being paid to get shit done. The code produced is what it's worth.