Code quality fixes (JSLint errors)