Finish impementation of CDiagM.