Better automated tests

Use Mocha and Chai for running automated tests instead of Jasmine.
Fix'd