complete rewrite: sorting pages, waiting on promise from all URLs, not appending on every call, etc