Refactor dialogs into their own classes.