Allow images in books. Refactor logic.