Refactoring BookRepository