         
         self.stopsViewModel = stopsViewModel
         self.schedulesRepository = schedulesRepository
-        
+        self.lights = []
+
         super.init(coder: coder)
         
         self.nearbyStopsViewControllerModel.delegate = self

    var schedule: Schedule?
    
    let lifxNetworkContext: LFXNetworkContext
    var lights: LFXLight[]?
    
    let managedObjectContext: NSManagedObjectContext = {
        let moc = NSManagedObjectContext(concurrencyType: .MainQueueConcurrencyType)

    
    func updateLights()
    {
        if let lights = self.lifxNetworkContext.allLightsCollection.lights as? LFXLight[]
        {
            self.lights = lights
        }
        
        if self.lights.count > 0
        {
            let light: LFXLight = self.lights[0]

            let color = self.colorForCurrentSchedule(self.schedule)
            light.setColor(color)
        }
