Move dialog code directly to the dialogs