             AppConfig.sharedConfiguration.applicationUserDefaults.synchronize()
         }
 
+        if WCSession.isSupported() {
+            let connectionSession = WCSession.defaultSession()
+
+            //if connectionSession.paired && connectionSession.watchAppInstalled {
+                connectionSession.delegate = self
+                connectionSession.activateSession()
+            //}
+        }
+
         Datamanager.sharedManager().cleanupPlots { () -> Void in
             WindManager.sharedManager.refreshInterval = 60
             WindManager.sharedManager.startUpdating()
         }
+
+        Datamanager.sharedManager().indexActiveStations()
 
         application.setMinimumBackgroundFetchInterval(UIApplicationBackgroundFetchIntervalMinimum)
 



    func applicationDidBecomeActive(application: UIApplication) {
        RHEVindsidenAPIClient.defaultManager().background = false
    }



        return true
    }


    // MARK: - WC Session


    func sessionWatchStateDidChange(session: WCSession) {
        DLOG("Session: \(session)")
    }

    func sessionReachabilityDidChange(session: WCSession) {
        DLOG("Session: \(session)")
    }

    func session(session: WCSession, didReceiveMessage message: [String : AnyObject], replyHandler: ([String : AnyObject]) -> Void) {
        DLOG("Session: \(message)")
        replyHandler(["result": "not_updated"])
    }


    // MARK: - NSUserActivity

    override func updateUserActivityState(activity: NSUserActivity) {
        DLOG("\(activity)")
    }

    func application(application: UIApplication, willContinueUserActivityWithType userActivityType: String) -> Bool {
        return true
    }


    func application(application: UIApplication, continueUserActivity userActivity: NSUserActivity, restorationHandler: ([AnyObject]?) -> Void) -> Bool {
        DLOG("Activity: \(userActivity.activityType) - \(userActivity.userInfo)")


        if userActivity.activityType == CSSearchableItemActionType, let userInfo = userActivity.userInfo, let urlString = userInfo[CSSearchableItemActivityIdentifier] as? String {
            DLOG("URL STRING: \(urlString)")
            let url = NSURL(string: urlString)
            let success = openLaunchOptionsURL(url!)

            return success
        } else if let userInfo = userActivity.userInfo, let urlString = userInfo["urlToActivate"] as? String {
            let url = NSURL(string: urlString)
            let success = openLaunchOptionsURL(url!)

            return success
        }

        return false
    }

