Completely restructured tests for mocha

Closes #1 and #2