Setup UT testing framework. Fix some  JSHint errors