Refactoring download button