Add digest to unit type and fix reading cmti files