improving autosaving and form submission