Re-added Download button and functionality, and made a few minor code adjustments