Added minor improvements to downloader code

Also added comments. And look at the time, Tim. That's called
dedication. :P