lots of minor clean up