added initial draft of gamestate save and restore type functions