Completed refactoring.