         if let messageString = self.webView?.stringByEvaluatingJavaScriptFromString(jsMethod),
             let messageData = messageString.dataUsingEncoding(NSUTF8StringEncoding) {
             log("dispatchMessageQueueFromJS:\(messageString)")
-            let rawMessages = parseMessageQueue(messageData)
-            for rawMessage in rawMessages {
-                if let message = Message(rawDict: rawMessage) {
-                    if message.method == JBX_METHOD_SEND {
-                        handleMessageSentFromJS(message)
-                    } else if message.method == JBX_METHOD_CALLBACK {
-                        handleMessageCallbackFromJS(message)
-                    }
+            let messages = parseMessageQueue(messageData)
+            for message in messages {
+                if message.method == JBX_METHOD_SEND {
+                    handleMessageSentFromJS(message)
+                } else if message.method == JBX_METHOD_CALLBACK {
+                    handleMessageCallbackFromJS(message)
                 }
             }
             return false


public class JSBridgeX: NSObject, UIWebViewDelegate {
 
    public typealias EventCallback = (code: Int, data: [String: AnyObject]?) -> Void
    public typealias EventHandler = (data: [String: AnyObject]?, callback: EventCallback?) -> Void
    public typealias DefaultEventHandler = (eventName: String, data: [String: AnyObject]?, callback: EventCallback?) -> Void
    
    public static let CODE_SUCCESS = 200
    public static let CODE_NOT_FOUND = 404

    
    //MARK: - private
    
    private func callback(code: Int, callbackId: String, data: AnyObject?) {
        let message = Message(method: JBX_METHOD_CALLBACK)
        message.code = code
        message.callbackId = callbackId
