Added prototyping for restoring saved states.