Basic save and load state implemented