Download books with images: code improvements