JS scripts tidy up.