fix for index page show after other page
gen
More code cleanups and bug fixes, readded autosave