     }
 
     func applicationDidEnterBackground(application: UIApplication) {
+		print("1111:   applicationDidEnterBackground")
+
         self.profile?.syncManager.applicationDidEnterBackground()
 
         var taskId: UIBackgroundTaskIdentifier = 0

            application.endBackgroundTask(taskId)
        }
    }

    private func setUpWebServer(profile: Profile) {
        let server = WebServer.sharedInstance

    // We sync in the foreground only, to avoid the possibility of runaway resource usage.
    // Eventually we'll sync in response to notifications.
    func applicationDidBecomeActive(application: UIApplication) {
		print("1111:   applicationDidBecomeActive")

        self.profile?.syncManager.applicationDidBecomeActive()

        // We could load these here, but then we have to futz with the tab counter
