Implemented separate buttons to update the database and download the draw  file. Changed download from file generation on the server to a string in memory.