Code cleanups for previous refactoring