Revamp proc_m, among other changes