Repository pattern - some code style changes