Miscellaneous bug fixes and reorganisation.
Fix CDCM statistics and include them in impact statements.