refactored scraper to be more readable.