Even more JS tidying