Added new class MainDialog