Add Repository model and rework init action