   
   //Adds a condition for sending next value, doesn't change passed value type
   
-  public func filter(handler: T -> Bool) -> Signal<T> {
-    var nextSignal: Signal<T>!
-    if self is Observable { nextSignal = Observable<T>() }
-    else { nextSignal = Pipe<T>() }
+  public func filter(handler: T -> Bool) -> Pipe<T> {
+    let nextSignal = Pipe<T>()
     subscribeNext { [weak nextSignal] in
       if handler($0) { nextSignal?.sendNext($0) }
       }.putInto(nextSignal.pool)

  
  public func map<U>(handler: T -> U) -> Signal<U> {
    var nextSignal: Signal<U>!
    if self is Observable { nextSignal = Observable<U>() }
    else { nextSignal = Pipe<U>() }
    subscribeNext { [weak nextSignal] in nextSignal?.sendNext(handler($0)) }.putInto(nextSignal.pool)
    chainSignal(nextSignal)

  public func combineLatest<U>(otherSignal: Signal<U>) -> Signal<(T?, U?)> {
    let persistentSelf = observable()
    let persistentOther = otherSignal.observable()
    if let observableSelf = self as? Observable<T> {
      persistentSelf.value = observableSelf.value
    }
    
    if let observableOther = otherSignal as? Observable<U> {
      persistentOther.value = observableOther.value
    }
    
    let nextSignal = Observable<(T?, U?)>()
    
