some minor refactorings and additions