Creating a book list in an object-oriented way in javascript