lots of jshint tweaks.