minor refactorings and renaming of some classes