added auto-saving system and loading from stored state. now fully working, also some graphical change, added clear functions to clear memory