major cleanup towards Kev 5.2.0