refactored scraper.js to be a node module and wrote basic tests