switched to mocha testing framework
reworked most of the testing code to execute async correctly
added more unit tests