Refactoring mostly: better split of responsibilities between repository and uploader.