updated main (to first approximation) for DM, removed references to DEBUG_SAI