Fixed all karma and mocha tests
Merge branch 'pr/4'