Refactor and largely simplify getRepoStrings() + add tests