Commented and fixed JSLint errors in code