Fix various JSHint issues.
Fix JSHint redefinition warning.