Minor refactoring.