More minor refactoring.