Add support for retrieving repositories. Closes #1