Further refactoring in scraper - not yet finished.