Refactoring legacy code kata