                             break
                         }
                     }
-                    
-                    if let (queue, handler, parameters) =
-                        (overwrittingRoute.map { self.filterRoute($0, routes: routes).first } ?? routeComponents) {
-                        var parameters = parameters
-                        (overwrittingParameters ?? queryParameters).forEach {
-                            parameters[$0.0] = $0.1
+                }
+                
+                for route in _routes where !route.isProxy && route.matches(matchedString) != nil {
+                    dispatch_async(route.queue) {
+                        if case let .Route(handler) = route.handler {
+                            handler(matchedString, parameters) {
+                                dispatch_semaphore_signal(semaphore)
+                            }
                         }
-                        dispatch_async(queue) { handler(overwrittingRoute ?? URLString, parameters) {
-                            dispatch_semaphore_signal(semaphore) }
-                        }
-                        dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER)
                     }
+                    dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER)
                 }
             }
-            return true
         }
-        return false
+        return true
     }
+    
 }

    
    public func map(pattern: String,
                    queue: dispatch_queue_t = dispatch_get_main_queue(),
                    handler: Route.MapHandler) -> Void {
        dispatch_async(accessQueue) {
            self.routes.insert(Route.register(pattern, queue: queue, handler: handler), atIndex: 0)
        }
    }
    
    public func proxy(pattern: String,
                      queue: dispatch_queue_t = dispatch_get_main_queue(),
                      handler: Proxy.ProxyHandler) -> Void {
        dispatch_async(accessQueue) {
            self.proxies.insert(Proxy.register(pattern, queue: queue, handler: handler), atIndex: 0)
        }
    }
    

    }
    
    public func open(URL: NSURL) -> Bool {
        guard let components = NSURLComponents(URL: URL, resolvingAgainstBaseURL: false) else {
            return false
        }
        
        var _routes: [Route]!
        var matchedRoute: Route!
        var matchedString: String!
        var parameters: Route.Parameters!
        dispatch_sync(accessQueue) {
            _routes = self.routes
            if _routes.count > 0 {
                var queryParameters: [String: String] = [:]
                components.queryItems?.forEach {
                    queryParameters.updateValue(($0.value ?? ""), forKey: $0.name)
                }
                components.query = nil
                var URLString = components.string ?? ""
                
                for route in _routes where !route.isProxy {
                    if let matches = route.matches(URLString) {
                        matchedRoute = route
                        matchedString = URLString
                        parameters = route.parameters(URLString, matches: matches)
                        queryParameters.forEach { parameters![$0.0] = $0.1 }
                        break
                    }
                }
            }
        }
        
        guard matchedRoute != nil else {
            return false
        }
        
        defer {
            dispatch_async(routingQueue) {
                let semaphore = dispatch_semaphore_create(0)
                var overwrittingRoute: String?, overwrittingParameters: Route.Parameters?
                
                for route in _routes where route.isProxy && route.matches(matchedString) != nil {
                    if case let .Proxy(handler) = route.handler {
                        dispatch_async(route.queue) {
                            handler(matchedString, parameters) { (route, params) in
                                matchedString = route
                                parameters = params
                                dispatch_semaphore_signal(semaphore)
                            }
                        }
