More minor refactoring tweaks