Fixed final cleanup when torrent download is removed.
Refactor.