                         
                         self.compassControl?.configureWith(site)
                         self.uploaderBatteryLabel?.text = watchEntry.batteryString
+                        
+                        self.uploaderBatteryLabel?.textColor = colorForDesiredColorState(watchEntry.batteryColorState)
+                                                
                         self.lastReadingLabel?.text = watchEntry.dateTimeAgoString
                         
                         if let rawValue = watchEntry.raw {
+                            let color = colorForDesiredColorState(site.configuration!.boundedColorForGlucoseValue(Int(rawValue)))
+                            self.rawReadingLabel?.textColor = color
                             self.rawReadingLabel?.text = "\(NSNumberFormatter.localizedStringFromNumber(rawValue, numberStyle: NSNumberFormatterStyle.DecimalStyle)) : \(watchEntry.sgv!.noise)"
                         }
                         
                         let timeAgo = watchEntry.date.timeIntervalSinceNow
                         
                         // TODO:// Deprecate this StaleDataTimeFram check and use the alarms when available. Fll back to this whne no alarm for stale data available.
-                        let maxValue: NSTimeInterval
+                        let timeAgoWarnValue: NSTimeInterval
+                        let timeAgoUrgentValue: NSTimeInterval
                         if let defaults = site.configuration?.defaults {
-                            maxValue = max(Constants.NotableTime.StaleDataTimeFrame, defaults.alarms.alarmTimeAgoWarnMins)
+                            timeAgoWarnValue = max(Constants.NotableTime.StaleDataTimeFrame, defaults.alarms.alarmTimeAgoWarnMins)
+                            timeAgoUrgentValue = defaults.alarms.alarmTimeAgoUrgentMins
                         } else {
-                            maxValue = Constants.NotableTime.StaleDataTimeFrame
-                        }
-                        
-                        if timeAgo < -maxValue {
+                            timeAgoWarnValue = Constants.NotableTime.StaleDataTimeFrame
+                            timeAgoUrgentValue = Constants.NotableTime.StaleDataTimeFrame * 10
+                        }
+                        
+                        if timeAgo < -timeAgoWarnValue {
                             self.compassControl?.alpha = 0.5
                             self.compassControl?.color = NSAssetKit.predefinedNeutralColor
                             self.compassControl?.sgvText = "---"

        
        if let siteOptional = site {
            nsApi = NightscoutAPIClient(url:siteOptional.url)
            updateSite(nil)
            
            AppDataManager.sharedInstance.shouldDisableIdleTimer = siteOptional.overrideScreenLock
        }
    }
    

    @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
            #if DEBUG
                println("Canceled action: \(action)")
            #endif
        }
        alertController.addAction(cancelAction)
        
        let checkEmoji = "✓ "
        
        var yesString = "   "
        if site!.overrideScreenLock == true {
            yesString = checkEmoji
        }
        let yesAction = UIAlertAction(title: "\(yesString)\(Constants.LocalizedString.generalYesLabel.localized)", style: UIAlertActionStyle.Default) { (action) -> Void in
            self.updateScreenOverride(true)
            #if DEBUG
                println("Yes action: \(action)")
            #endif
        }
        alertController.addAction(yesAction)
        
        var noString = "   "
        if (site!.overrideScreenLock == false) {
            noString = checkEmoji
        }
        let noAction = UIAlertAction(title: "\(noString)\(Constants.LocalizedString.generalNoLabel.localized)", style: UIAlertActionStyle.Default) { (action) -> Void in
            self.updateScreenOverride(false)
            #if DEBUG
                println("No action: \(action)")
            #endif
        }
        alertController.addAction(noAction)
        
        self.presentViewController(alertController, animated: true) {
            #if DEBUG
                println("presentViewController: \(alertController.debugDescription)")
            #endif
        }
    }
    
    func updateScreenOverride(shouldOverride: Bool) {
        self.site!.overrideScreenLock = shouldOverride
   
        AppDataManager.sharedInstance.shouldDisableIdleTimer = self.site!.overrideScreenLock
        AppDataManager.sharedInstance.updateSite(site!)
        
        #if DEBUG
            println("{site.overrideScreenLock:\(site?.overrideScreenLock), AppDataManager.shouldDisableIdleTimer:\(AppDataManager.sharedInstance.shouldDisableIdleTimer), UIApplication.idleTimerDisabled:\(UIApplication.sharedApplication().idleTimerDisabled)}")
        #endif
    }
    
    @IBAction func gotoLabs(sender: UITapGestureRecognizer) {
        // #if DEBUG
        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("Present Labs as a modal controller!")
        }
        // #endif
    }
}