more js tidying update