Moved book out of main class, was causing nullpointerexeption