Remainder of refactoring