done some more tidying up