Debugging MinCostFlow

Got rid of null pointers, still work to do.