Refactoring download