Add beforeEach and afterEach to jshint global list.
Fix jshint warnings.
Work on #14(Add unit test for all the APIs)