Cleanup handler. Make sure updateViews() is non-reentrant.