Adds mocha.opts file, refactors some code due to the addition