Finished save/load state logic

Finished save/load state logic