Added loading and saving of manager state.

Probably some more things to do, but everything seems to be working at the moment.