Removed some unnecessary code from MainActivity.