Handle dialogue creation and destruction