Add download functionality to search module

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