HTML cleanup, connect dialog closing to _performActions()