Factored out scraping mechanism