Minor JS tweaks found with ESLint.

BTW, I still believe the current JSHint settings are weird, but I guess the final call is for @alanshaw to make :)