clear up some JS, make jshint happy