             HKObjectType.workoutType(),
             HKObjectType.quantityTypeForIdentifier(HKQuantityTypeIdentifierHeartRate)
         ])
+        
+        if let linkedServices = self.defaults.arrayForKey("linkedServices") as? [String] {
+            self.linkedServices = linkedServices.sorted() {$0 < $1}
+        }
         
         if !HKHealthStore.isHealthDataAvailable() {
             println("HealthKit Not Available")

    var initialAppearance = true
    
    var dataLoaded = false

    override func viewDidLoad() {
        super.viewDidLoad()

    override func viewWillAppear(animated: Bool) {
        super.viewWillAppear(animated)
        if !self.initialAppearance {
            if let linkedServices = self.defaults.arrayForKey("linkedServices") as? [String] {
                self.linkedServices = linkedServices.sorted() {$0 < $1}
            }
            
            // Refresh for tableview accessories
            self.tableView.reloadData()
        } else {
