Add mocha tests, binary, simplifications