Refactoring: split the functionality of books and shelves into separate js files