Updated generate flow.