apply some jshint tips