Minor refactorization.