Implement main activity.