Added onOptionsItemSelected menu logic.