Refactored Flow algorithms. Main algorithm put to FlowCalculatorBase. Child classes initialize batch instance which legt fest, ob queue oder stack.