Cleaned up JS.
Moved module imports to be before variable definitions.
Mocked up basic torrent selection. TODO: Coffee cleanup!