Minor refactorings.