Bunch of fixes to Mocha Test