More miscellaneous refactoring