some tidy up

well I left this stuff uncommitted a couple of weeks ago and I cba to read
the diff properly