                 {
                     if type(of: strongSelf).isVideoStatusFinal(freshVideo) == true // We're done!
                     {
-                        strongSelf.videos.removeValueForKey(uri)
+                        strongSelf.videos.removeValue(forKey: uri)
                         strongSelf.delegate?.uploadingStateDidChangeForVideo(freshVideo)
                         
                         return

        self.sessionManager = sessionManager
        self.delegate = delegate
        
        self.operationQueue = NSOperationQueue()
        self.operationQueue.maxConcurrentOperationCount = 1
        
        super.init()

                
                if let error = operation.error
                {
                    if let response = error.userInfo[AFNetworkingOperationFailingURLResponseErrorKey] as? HTTPURLResponse, response.statusCode == 404
                    {
                        strongSelf.videos.removeValue(forKey: uri) // The video was deleted, remove it from consideration
                    }
                    else
                    {
