Refactoring Repository to leave it more flexible!