Updated to now save instance state automatically.

Using ids