Installing mocha and validation modules, cleaning up code