Download refactor