Refactored DialogFactory.java, XmlDialogFactory.java.