I noticed some of your warning dialogs are fairly small. It might be worth investigating $input() to shorten your code immensely. Although $input() can be short sighted when it comes to button events and such so it may be that it doesn't fit the bill at all; if this is the case simply ignore my suggestion. Looks great otherwise. Nice to see a little variety in snippets submissions lately.