Refactoring for download queue