Refactor to make use of fragments instead of separate activities.