big cleanup
more tidying