Download logic refactored out into ResourceDownloader