Improved state storage.