Further fixes and refactorings of URL downloads