More cleanup in torrent framework.