cleanup code according to jshint rules