Basic save state functionality, no loading.

That's a question for @aeng