Add sort-torrents, fix a bunch of stuff.