fixed autosave
more cleaning up