Clean up and restore old state function added