Refactored new Dialog implementation into the original class name