Refactor Scraper code