Changed the way the new activities are called from the main activity.