Renamed intent2 to intent in MainActivity.