DRY download code.