Integrating Min Cost Flow

making min cost flow work more elegantly with our graph architecture.