Some code refactorings to Repositories and added unit of work