Clean up scraper.js structure a bit