Implemented a very early draft of a very powerful state saving system