More work on persistant state.

It works now except that the seed is goofed.