Updated AppDelegate.