Refactor downloads
Merge branch 'refactoring'