cleaned up JavaScript with JSLint