             sessionTask.resume(task)
         }
     }
-
+    
     private func sessionTaskWith(request: ImageRequest, key: ImageRequestKey) -> ImageSessionTask {
         let sessionTask = ImageSessionTask(key: key)
-        let dataTask = self.dataLoader.taskWith(request, progress: { [weak self] completed, total in
-            self?.sessionTask(sessionTask, didUpdateProgressWithCompletedUnitCount: completed, totalUnitCount: total)
-            }, completion: { [weak self] data, response, error in
-                self?.sessionTask(sessionTask, didCompleteWithData: data, response: response, error: error)
-            })
-        sessionTask.dataTask = dataTask
+        sessionTask.dataTask = self.dataLoader.taskWith(request, progress: { [weak self] completed, total in
+            self?.sessionTask(sessionTask, didUpdateProgress: ImageTaskProgress(completed: completed, total: total))
+        }, completion: { [weak self] data, response, error in
+            self?.sessionTask(sessionTask, didCompleteWithData: data, response: response, error: error)
+        })
         return sessionTask
     }
-
-    private func sessionTask(sessionTask: ImageSessionTask, didUpdateProgressWithCompletedUnitCount completedUnitCount: Int64, totalUnitCount: Int64) {
-        dispatch_async(self.queue) {
-            sessionTask.progress = ImageTaskProgress(completed: completedUnitCount, total: totalUnitCount)
+    
+    private func sessionTask(sessionTask: ImageSessionTask, didUpdateProgress progress: ImageTaskProgress) {
+        dispatch_async(self.queue) {
+            sessionTask.progress = progress
             for imageTask in sessionTask.tasks {
                 self.manager?.loader(self, task: imageTask, didUpdateProgress: sessionTask.progress)
             }
         }
     }
-
+    
     private func sessionTask(sessionTask: ImageSessionTask, didCompleteWithData data: NSData?, response: NSURLResponse?, error: ErrorType?) {
         guard let data = data where error == nil else {
             self.sessionTask(sessionTask, didCompleteWithImage: nil, error: error)

            a.networkServiceType == b.networkServiceType &&
            a.allowsCellularAccess == b.allowsCellularAccess
    }

    /** Compares request `URLs` and processors.
     */
    func loader(loader: ImageLoader, isCacheEquivalent lhs: ImageRequest, to rhs: ImageRequest) -> Bool {
        guard lhs.URLRequest.URL == rhs.URLRequest.URL else {

    /** Managers that controls image loading.
     */
    weak var manager: ImageLoadingManager? { get set }
    
    /** Resumes loading for the given task.
     */
    func resumeLoadingFor(task: ImageTask)
    
    /** Suspends loading for the given task.
     */
    func suspendLoadingFor(task: ImageTask)
    
    /** Cancels loading for the given task.
     */
    func cancelLoadingFor(task: ImageTask)
    
    /** Compares requests for equivalence with regard to caching output image. This method is used for memory caching, in most cases there is no need for filtering out the dynamic part of the request (is there is any).
     */
    func isCacheEquivalent(lhs: ImageRequest, to rhs: ImageRequest) -> Bool
    
    /** Invalidates the receiver.
     */
    func invalidate()
    
    /** Clears the receiver's cache storage (if any).
     */
    func removeAllCachedImages()
