cleanup and making jshint happy