added support for jpeg images
extracted the Book object to its own module