Changes to MainDialog class