tidy up autosave and added useful helper methods