Made code JSLint compliant.