Added optional mocha for unit testing