Update to AppDelegate to support CoreData.