Improved dialogs and renamed onOptionsButtonPressed method