Some minor refactoring for consistency.