Further cleaned up MainActivity.