Got rid of magic number nine and fixed formatting
Added nextPage variable back into buildPage call
Added error handling for gallery pages, and raises an error if no images were
found.