Lots of code/test cleanup.  Got the test suite working under requirejs