A legacy-style class that needs refactoring, and how to do it