Clean up app state.