[WIP] Mocha integration

As promises and the auto struct generation code have been merged, I've been cleaning up the source code and tests to reflect this.