Don't create the repositories multiple times when call getDefaultRepositories
Still some refactoring needed