tools: Avoid polling in downloader (plus formatting cleanups).