Fixes syntax errors and adds percent downloaded

Fixes syntax errors that my JavaScript linter caught.  But more importantly, it adds total bytes of the torrent being downloaded, and calculates percent complete.