Clean up of dialog framework