added mocha test cases & cleaned