continued hibernate mappings + small refactoring