This took a while so a bunch of stuff got broken in rebase.
Additionally, fix downloading in chunks for some files.