 /// Used as a factory to create a `ReactorFlow` around a Sequence of `T` that are `Mappable`
 public func createFlow<T where T: SequenceType, T.Generator.Element: Mappable>(persistencePath: String = "", baseURL: NSURL, configuration: ReactorConfiguration) -> ReactorFlow<T> {
     
-    let network: Network
-    if configuration.shouldCheckReachability {
-        network = Network(baseURL: baseURL)
-    }
-    else {
-        network = Network(baseURL: baseURL, reachability: AlwaysReachable())
-    }
-    
+    let network: Network = createNetwork(baseURL, shouldCheckReachability: configuration.shouldCheckReachability)
+
     let parser: NSData -> SignalProducer<T, Error> = parse
     let networkFlow: Resource -> SignalProducer<T, Error> = { resource in network.makeRequest(resource).map { $0.0}.flatMapLatest(parser) }
     

/// Used as a factory to create a `ReactorFlow` around a single `T` that is `Mappable`
public func createFlow<T where T: Mappable>(persistencePath: String = "", baseURL: NSURL, configuration: ReactorConfiguration) -> ReactorFlow<T> {
    
    let network: Network
    if configuration.shouldCheckReachability {
        network = Network(baseURL: baseURL)
    }
    else {
        network = Network(baseURL: baseURL, reachability: AlwaysReachable())
    }
    
    let parser: NSData -> SignalProducer<T, Error> = parse
    let networkFlow: Resource -> SignalProducer<T, Error> = { resource in network.makeRequest(resource).map { $0.0}.flatMapLatest(parser) }

        return ReactorFlow(networkFlow: networkFlow)
    }
}

private func createNetwork(baseURL: NSURL, shouldCheckReachability: Bool) -> Network {
    
    if shouldCheckReachability {
       return Network(baseURL: baseURL)
    }
    else {
       return Network(baseURL: baseURL, reachability: AlwaysReachable())
    }
}
