added Torrents buttons, refactor pending