Added an autosave feature.