Build out torrent.js file, torrent logic