Reintroduce [download_history]. Refactored the entire template and made it work with bundled files. Closes #1262