     var data = [AnyObject]()
     
     override func viewDidLoad() {
-        
-        println("viewDidLoad")
-        
         super.viewDidLoad()
         // Do any additional setup after loading the view, typically from a nib.
         // navigationController?.hidesBarsOnTap = true
-        
-        NSNotificationCenter.defaultCenter().addObserver(self, selector: "updateSite:", name: Constants.Notification.DataIsStaleUpdateNow, object: nil)
-        println(parentViewController)
-        
         // remove any uneeded decorations from this view if contained within a UI page view controller
         if let pageViewController = parentViewController as? UIPageViewController {
-            println("contained in UIPageViewController")
+            // println("contained in UIPageViewController")
             self.view.backgroundColor = UIColor.clearColor()
             self.titleLabel?.removeFromSuperview()
         }

    @IBAction func gotoSiteSettings(sender: UIBarButtonItem) {
        
        let alertController = UIAlertController(title: Constants.LocalizedString.uiAlertScreenOverrideTitle.localized, message: Constants.LocalizedString.uiAlertScreenOverrideMessage.localized, preferredStyle: UIAlertControllerStyle.ActionSheet)
        alertController.view.tintColor = NSAssetKit.darkNavColor
        
        let cancelAction = UIAlertAction(title: Constants.LocalizedString.generalCancelLabel.localized, style: .Cancel) { (action) in
            // ...
        }
        alertController.addAction(cancelAction)
        
        var yesString = "   "
        if site!.overrideScreenLock == true {
            yesString = "✓ "
        }
        let yesAction = UIAlertAction(title: "\(yesString)\(Constants.LocalizedString.generalYesLabel.localized)", style: UIAlertActionStyle.Default) { (action) -> Void in
            self.updateScreenOverride(true)
        }
        alertController.addAction(yesAction)
       
        var noString = "   "
        if (site!.overrideScreenLock == false) {
            noString = "✓ "
        }
        let noAction = UIAlertAction(title: "\(noString)\(Constants.LocalizedString.generalNoLabel.localized)", style: UIAlertActionStyle.Default) { (action) -> Void in
            self.updateScreenOverride(false)
        }
        alertController.addAction(noAction)
        
        self.presentViewController(alertController, animated: true) {
            // ...
        }
    }

    func updateScreenOverride(shouldOverride: Bool) {
        let index = AppDataManager.sharedInstance.currentSiteIndex
        self.site!.overrideScreenLock = shouldOverride
        AppDataManager.sharedInstance.shouldDisableIdleTimer = self.site!.overrideScreenLock
        AppDataManager.sharedInstance.sites[index] = self.site!
        
        println("This site shouldOverrideScrenLock: \(site?.overrideScreenLock) and the app is: \(AppDataManager.sharedInstance.shouldDisableIdleTimer)")

    }
    
    @IBAction func gotoLabs(sender: UITapGestureRecognizer) {
        let storyboard = UIStoryboard(name: UIStoryboard.StoryboardName.Labs.rawValue, bundle: NSBundle.mainBundle())
        NSUserDefaults.standardUserDefaults().setURL(site!.url, forKey: "url")
        presentViewController(storyboard.instantiateInitialViewController() as! UIViewController, animated: true) { () -> Void in
            println("labs!")
        }
    }
}
        
        if let siteOptional = site {
            nsApi = NightscoutAPIClient(url:siteOptional.url)
            AppDataManager.sharedInstance.shouldDisableIdleTimer = siteOptional.overrideScreenLock
            NSNotificationCenter.defaultCenter().addObserver(self, selector: "updateSite:", name: Constants.Notification.DataIsStaleUpdateNow, object: nil)
            
            updateSite(nil)
        }
    }
    
