Begin refactoring