fix various http://jshint.com/ abd Closure Compiler warnings