Completely refactor download.html

Yes, I know. That previous code was absolutely horrendous.

I got rid of it.