     let nc     = NSNotificationCenter.defaultCenter()
     
     
-    /// Things to do when view has loaded.
     override func viewDidLoad() {
         super.viewDidLoad()
-        
-        discovery        = BTDiscoveryManager()
-        isConnected      = false
         
         self.initLabels()
         self.makeButtonCircular()

    }
    
    
    func btConnectionChanged(notification: NSNotification) {
        println("got connection changed notification: \(notification)")
        
        let userinfo = notification.userInfo as [String: Bool]
        let service  = notification.object as BTService
        let peripheral = service.peripheral
        
        if let isConnected: Bool = userinfo["isConnected"] {
            self.isConnected = isConnected
            
            dispatch_async(dispatch_get_main_queue(), {
                self.updateOpenButtonNormal()
                self.statusLabel.text = "Connected"
            })
        
        }

        self.registerObservers()
        self.setTheme()
        self.checkAndConfigureAutoTheme()
        
        self.discovery = BTDiscoveryManager()
    }
    
    
