Cleanup and changed state update with next state