Pull out dep scraping into it's own function.