Make comments Javascript work and tidy up a bit