Sometimes when confronted with adding more crap to someone else's crappy program, I just decide to rewrite it right. Probably more often than most others would recommend. My reasons? 1. In the long run, everyone will be better off. 2. If's not how quickly you get started; it's how quickly you get done. 3. I just don't feel like working on crap today (or any other day). 4. I want to write something I could be proud of.
Sometimes it just takes a rewrite in order to put yourself in a position of writing code you can be proud of.