Completely refactors scrape.py.