Redrawn flow diagram

Adjust to recent changes in the code. Still not completely consistent.