JSLint warnings fixed