Added ability to reset to initial state.