further minor refactorings