Implemented autosave (#292)