 
 import Foundation
 
-let session = NSURLSession(configuration: NSURLSessionConfiguration.defaultSessionConfiguration(), delegate: nil, delegateQueue: NSOperationQueue.mainQueue())
+let session = NSURLSession(
+    configuration: NSURLSessionConfiguration.defaultSessionConfiguration(),
+    delegate: nil,
+    delegateQueue: NSOperationQueue.mainQueue()
+)
 
-public class WebLoadAction<T>: LoadAction<T> {
+public class WebLoadAction<T>: ProcessLoadAction<NSData, T> {
     
     public typealias UrlRequestResultType    = Result<NSURLRequest, ErrorType>
     public typealias UrlRequestResultClosure = (result: UrlRequestResultType) -> Void
     public typealias UrlRequestResult        = (completion: UrlRequestResultClosure) -> Void
     
-    public typealias ProcessDataResultType    = Result<T, ErrorType>
-    public typealias ProcessDataResultClosure = (result: ProcessDataResultType) -> Void
-    public typealias ProcessDataResult        = (loadedData: NSData, completion: ProcessDataResultClosure) -> Void
-    
     public var urlRequestClosure:  UrlRequestResult
-    public var processDataClosure: ProcessDataResult?
     
     /**
      Loads data giving the option of paging or loading new.

     */
    public init(
        urlRequest: UrlRequestResult,
        process:    ProcessDataResult?,
        delegates:  [LoadActionDelegate] = [],
        dummy:      (() -> ())? = nil)
    {
        self.urlRequestClosure  = urlRequest
        self.processDataClosure = process
        super.init(
            load:      { _ in },
            delegates: delegates
        )
        loadClosure = { (result) -> Void in
            self.loadInner(completion: result)
        }
    }
}

                        completion(result: .Failure(error))
                        return
                    }
                    completion(result: .Success(loadedData))
                }).resume()
            }
        }
    }
    
