         }
         
         /// :nodoc:
-        public mutating func value(_ newDbValues: [DatabaseValue]) -> [T]? {
-            if let dbValues = dbValues, dbValues == newDbValues {
-                // Don't notify consecutive identical dbValues
+        public mutating func value(_ dbValues: [DatabaseValue]) -> [T]? {
+            if let previousDbValues = previousDbValues, previousDbValues == dbValues {
+                // Don't notify consecutive identical dbValue arrays
                 return nil
             }
-            self.dbValues = newDbValues
-            return newDbValues.map { T.decode(from: $0, conversionContext: nil) }
+            self.previousDbValues = dbValues
+            return dbValues.map {
+                T.decode(from: $0, conversionContext: nil)
+            }
         }
     }
     
     /// A reducer which outputs optional values, filtering out consecutive
     /// identical database values.
     public struct Value<T: DatabaseValueConvertible>: ValueReducer {
-        let _fetch: (Database) throws -> DatabaseValue?
-        var dbValue: DatabaseValue??
-        var previousValueWasNil = false
+        private let _fetch: (Database) throws -> DatabaseValue?
+        private var previousDbValue: DatabaseValue??
+        private var previousValueWasNil = false
         
         /// TODO
         public init(_ fetch: @escaping (Database) throws -> DatabaseValue?) {

public enum ValueReducers {
    /// A reducer which outputs raw database values, without any processing.
    public struct Raw<Value>: ValueReducer {
        let _fetch: (Database) throws -> Value
        
        public init(_ fetch: @escaping (Database) throws -> Value) {
            self._fetch = fetch

        }
        
        /// :nodoc:
        public mutating func value(_ dbValue: DatabaseValue?) -> T?? {
            if let previousDbValue = previousDbValue, previousDbValue == dbValue {
                // Don't notify consecutive identical dbValue
                return nil
            }
            self.previousDbValue = dbValue
            if let dbValue = dbValue,
                let value = T.decodeIfPresent(from: dbValue, conversionContext: nil)
            {
                previousValueWasNil = false
                return .some(value)
            } else if previousValueWasNil {
                // Don't notify consecutive nil values
                return nil
            } else {
                previousValueWasNil = true
                return .some(nil)
            }
        }
    }
