Fix JSHint issues.

JSHint checking has not been functioning properly. This PR fixes up the broken areas in preparation for re-enabling it.