Started linear heuristic refactoring