 
     private func loadRequest() {
         if webView.URL == nil {
-            let request = NSURLRequest(URL: URL!)
+            let request = NSURLRequest(URL: URL)
             webView.loadRequest(request)
         }
     }

    
    // MARK - WebViewControllerNavigationDelegate

    func visitLocation(URL: NSURL!) {
        let request = NSURLRequest(URL: URL)
        loadRequest(request)
    }
    
    func locationDidChange(URL: NSURL!) {
        
    }
}

func JSONStringify(object: AnyObject) -> NSString {
    if let data = NSJSONSerialization.dataWithJSONObject([object], options: nil, error: nil),
           string = NSString(data: data, encoding: NSUTF8StringEncoding) {
        return string.substringWithRange(NSRange(location: 1, length: string.length - 2))
    } else {
        return "null"
    }

        var delegate: WebViewControllerNavigationDelegate?

        func userContentController(userContentController: WKUserContentController, didReceiveScriptMessage message: WKScriptMessage) {
            if let body = message.body as? [String: AnyObject],
                name = body["name"] as? String,
                data = body["data"] as? String {
                    switch name {
                    case "visitLocation":
                        if let location = NSURL(string: data) {
                            self.delegate?.visitLocation(location)
                        }
                    case "locationChanged":
                        if let location = NSURL(string: data) {
                            self.delegate?.locationDidChange(location)
                        }
                    default:
                        println("Unhandled message: \(name): \(data)")
                    }
            }
        }
    }

    var URL = NSURL(string: "http://turbolinks.dev/")!
    var activeSessionTask: NSURLSessionTask?

    static let sharedWebView: WKWebView = {
