Modified the download function.

Added a Torrent struct. This can be used to track download success.