Saving state sharing in prefs. This concludes issue #67 probably.