Tidy up EDCM rules.