Mass rewrite: 

Using requests library.
Updating and downloading in a separate thread.
All the internal imports are condensed in a unique module.
The update thread can retry and continue cleanly if the json/xml
download fails.