clean up and adding jshint

Better validation than jslint (easier to configure)
Clean up coding style