Integration test

Includes changes needed to the base code such that it runs in node.js, and provides an initial integration test.