Remove unused code in cm_*.cpp/h