refactor out init code
refactor repo initialization