Clean up download.py a bit