Intermediate refactoring complete