Improve flow graph so it works in real time.