UI: Refactoring download buttons

and JS (first part)