         
         // TODO: extract common pattern
         let route = routes
-            .map { closure -> (RouteHandler?, Parameters) in
-                if case let .Route(f) = closure { return f(URLString) }
-                else { return (nil, [String: String]())}
-            }
+            .map { $0(URLString) }
             .filter { $0.0 != nil }
             .first
             .map { ($0!, $1) }

    public typealias Parameters = [String: String]
    public typealias Completed = () -> Void
    
    private enum RouteType {
        case Proxy((String) -> (ProxyHandler?, Parameters))
        case Route((String) -> (RouteHandler?, Parameters))
    }
    
    private var accessQueue: dispatch_queue_t!
    private var routingQueue: dispatch_queue_t!
    private var callbackQueue: dispatch_queue_t!
    private var routes: [RouteType] = [RouteType]()
    
    public init(accessQueue: dispatch_queue_t = dispatch_queue_create("Routing Access Queue", DISPATCH_QUEUE_CONCURRENT),
        routingQueue: dispatch_queue_t = dispatch_queue_create("Routing Queue", DISPATCH_QUEUE_SERIAL),

            }

            let proxiedRoute = routes
                .map { $0(path) }
                .filter { $0.0 != nil }
                .first
                .map { ($0!, $1) }
