   // MARK: - GLKView and GLKViewController delegate methods
   
   func update() {
+    // Calculate the frame times
+    let nowTime : Double = CACurrentMediaTime()
+    runTime = nowTime-startTime
+    frameTime = nowTime - lastTime
+    lastTime = nowTime
+    
+    // Parse the latest data
+    if let data = latestSocketData {
+      let json = JSON(data: data.dataUsingEncoding(NSUTF8StringEncoding)!)
+      latestSocketData = nil
+      if let inst = display {
+        // Convert the JSON into a dictionary
+        inst.update(json.dictionaryValue)
+      }
+    }
+    
     let aspect = fabsf(Float(self.view.bounds.size.width / self.view.bounds.size.height))
     let drawWidth = display?.screenWidth ?? 1.0
     let drawHeight = display?.screenHeight ?? 1.0

    }
  }
  
  var socket : WebSocket? = nil
  
  override func viewDidLoad() {
    super.viewDidLoad()

  }
  func websocketDidReceiveMessage(socket: WebSocket, text: String)
  {
    // Just assign the data now, we don't need to update more than frame rate
    latestSocketData = text
  }
  
  func websocketDidReceiveData(socket: WebSocket, data: NSData)
