Convert download.js to a DownloadManager module.