Refactor Load event handlers and register different handler depending on whether a state can be restored.
Refactor Load event handlers and register different handler depending on whether a state can be restored.

PenguinF/sandra-three