 import WebKit
 
 public class SwiftBridgeCommander : NSObject, WKScriptMessageHandler {
-    let commandPrefix = "__SWIFT_BRIDGE_COMMANDER"
-    let bridgeScriptObject = "__SWIFT_BRIDGE_COMMANDER_JS_OBJECT"
+    let messageHandlerName = "__SWIFT_BRIDGE_COMMANDER"
+    let bridgeScriptObject = "BridgeCommander"
     
     let webView: WKWebView
     var commands = [String: CommandHandler]()

            print("Cannot parse message"); return
        }
        guard let handler = commands[msg.command!] else {
            print("Command not registered: \(msg.command)"); return
        }
        handler(BridgeCommand(msg, commander: self))
    }

        
        super.init()
        if let filepath = Bundle(for: type(of: self)).path(forResource: "SwiftBridgeCommander", ofType: "js") {            do {
            let contents = try String(contentsOfFile: filepath)
            self.webView.configuration.userContentController.addUserScript(WKUserScript(source: contents, injectionTime: .atDocumentEnd, forMainFrameOnly: false))
            self.webView.configuration.userContentController.add(self, name: messageHandlerName)
        } catch {
            print("Error occured")
            }
        } else {
            print("Error script not found")
