Cleaned up the main activity.