rejig to placate JSHint

Ran through JSHint because this is a Serious Project for Other People now. Lots of missing semicolons and superfluous function arguments.