I work in consulting; everything I do I do for the customer and to improve their codebase. I often see a lot of terrible code. I change it and try to educate the coder who was responsible. When I get comments on my code I will always assume that I am wrong. Not because I am bad but because I am not that long with the company. I am missing the domain knowledge, ways of working, standards and all that. When I do get responses that "this does not work" I ask the person why he thinks that is so. Often it is a misunderstanding on how they think that API works it is not very often that I am wrong but I do not always assume that I am better.
Since I have been working in this manner people are more open to changes themselfs. It works both ways.