Made the code JSLint Compliant