Tidy up client-side JS

Hi,

Another non-functional tidy-up, this time of the client-side JS. Again, it's mostly semi-colon related, with a few other bits.

Thanks,
Rowan