Refactor downloader WIP

Avoid using {...} for multi-line blocks.