Reformatting save_doc.js