         }
     }
     
-    // ==========================================
-    // ==========================================
+    
+    /**
+     Uploads an image (in the form of a Data object) to a specified location in the database.
+     - parameters:
+        - data: The Data object holding the image information to store in the database
+        - location: A path for the image data to be saved to, relative to the root of the storage database
+        - completion: Function called when finished, passing back an optional Error object when unsuccessful
+            - error: An Error object created and returned if unsuccesful for any reason
+     */
     public func uploadImage(data: Data, to location: String, completion: @escaping (Error?)->()) {
         var localError: Error?
         let store = Storage.storage().reference(withPath: location)


class DatabaseController {
    
    // FIXME: Refactor this class and NotificationsController to be non static
    private var userConversationListRef: DatabaseReference = Database.database().reference().child("userConversationList")
    
    // ==========================================
    // ==========================================
    public func downloadImage(into destination: UIImageView, from location: String, completion: @escaping (Error?)->()){
        let store = Storage.storage().reference(withPath: location)
        
        if (ImageCache.default.isImageCached(forKey: store.fullPath).cached) {
            
            // Check for image saved in cache, load image from disk if possible
            ImageCache.default.retrieveImage(forKey: store.fullPath, options: nil) { (image, cacheType) in
                if let image = image {
                    print("AT.ME:: Image was retrieved from cache at: \(store.fullPath)")
                    destination.image = image
                }
                

        print("Image cache cleared from disk and memory")
        ImageCache.default.calculateDiskCacheSize { (size) in print("Used disk size by bytes: \(size)") }
    }
    
    
    /**
     Determines if a conversation record currently exists between the current user and specified user
