Move auxiliary stuff used by maxflow algorithms to separate file