Made OptionsDialog implementation more elegant