Complete rewrite of original scraping script