Refactor in TorrentHandle.