Added setting a default repository. Part of a refactoring