Issue #2325457 by DamienMcKenna: Minor fixes to JS via JSHint.