Refactor initialization.
Add instance recovery.