Finish refactoring.