Improvements and fixes for torrent downloading