Refactor repository management; Add supprot for named branches