Scraper state refactoring