Update state and events