minor refactorings