code cleanup + jshint stuff