Move all that stuff into a book method in book model, call the method in create action