Added download button

Also made changes to make it work correctly