Refactor flow model. Create examples