   // "subscription": "/foo/**"
   // }
   func subscribe(channel:String) {
-    let dict:[String:AnyObject] = ["channel": BayeuxChannel.SUBSCRIBE_CHANNEL.rawValue, "clientId": self.fayeClientId!, "subscription": channel]
+    let dict:[String:AnyObject] = ["channel": BayeuxChannel.Subscribe.rawValue, "clientId": self.fayeClientId!, "subscription": channel]
     if let string = JSON(dict).rawString() {
       self.transport?.writeString(string)
       self.pendingSubscriptions.addObject(channel)

  // "clientId": "Un1q31d3nt1f13r",
  // "connectionType": "long-polling"
  func connect() {
    let dict:[String:AnyObject] = ["channel": BayeuxChannel.CONNECT_CHANNEL.rawValue, "clientId": self.fayeClientId!, "connectionType": "websocket"]

    if let string = JSON(dict).rawString() {
      self.transport?.writeString(string)

          } else {
            // OOPS
          }
        case .Connect:
          if messageDict["successful"].int == 1 {
            self.fayeConnected = true;
            self.connect()
          } else {
            // OOPS
          }
        case .Disconnect:
          if messageDict["successful"].int == 1 {
            self.fayeConnected = false;
            self.transport?.closeConnection()
