made a few tweaks to clear most issues in jshint

can quickly test here http://www.jshint.com/.