Updated the main screen activity so that it works with the activity.