Use the Mikado Method to do safe changes in a complex codebase
understandlegacycode.com