-removed an assert from refer() API - throws an exception anyway
-removed some old / unused dialog destruction code