Partial refactor of tests to be run with mocha normally
allow browser tests to run
update tests to run with browser globals