Hooked up save function. (only works in safari)