Work on the download function, misc. changes, saveImage function