Finish massive refactoring.