Making file download on index.html more modular