Code cleanup in Mongo XUL dialog