Tidy up of JS file.