replaced by download.py

I've put the whole code into the download.py file and completely recoded it.