See the paper Working Effectively with Legacy Code at http://www.objectmentor.com/resources/listArticles?key=author&author=Michael%20Feathers