Cleaned up imports and added support for downloading magnet torrents via sources.