Tidy up CDCM linear programming code.