Added ability to reset state