Add session state loading, copying from seed, fix a bunch of bugs with the above.