Minor refactorization