Completed refactoring