Add mocha testing framework

With some additional cleanup