Improve uploading torrent files, and add downloading