Modified MainActivity.