More flow changes, also added repo code