Merge "Adding new APIs to save state and retrieve it" into main