Redeveloped DownloadManager, and split up the logic a bit