Fixed JSLint and JSHint issues.