js tidying