General cleaning; included KgroupDGM and conditions for simulation at the beginning of each estimator