Comment There is a whole book on how to do this (Score 2) 236
Working Effectively with Legacy Code
http://www.amazon.co.uk/Working-Effectively-Legacy-Code-ebook/dp/B005OYHF0A/ref=sr_1_1?ie=UTF8&qid=1344190021&sr=8-1
When it is incorrect, it is, at least *authoritatively* incorrect. -- Hitchiker's Guide To The Galaxy