Allow for custom root definition.  Rewrite tests using mocha.