scrape refactoring