Refactor get repos