 }
 
 public func eventsWithColor(color: Event.Color, byColor: Bool = false, mappingBlock: YapDB.FetchConfiguration.MappingsConfigurationBlock? = .None) -> Configuration<Event> {
-    return Configuration(fetch: eventsWithColor(color, byColor: byColor, mappingBlock: mappingBlock)) { valueFromArchive($0) }
-}
-
-
-
+    return Configuration(fetch: eventsWithColor(color, byColor: byColor), itemMapper: Event.unarchive)
+}
+
+
+

    })

    let sorting: YapDB.View.Sorting = .ByObject({ (group, collection1, key1, object1, collection2, key2, object2) -> NSComparisonResult in
        if let event1: Event = valueFromArchive(object1) {
            if let event2: Event = valueFromArchive(object2) {
                return event1.date.compare(event2.date)
            }
        }
        return .OrderedSame
    })

    }

    public required init?(coder aDecoder: NSCoder) {
        let color = Event.Color(aDecoder.decodeObjectForKey("color"))
        let uuid = aDecoder.decodeObjectForKey("uuid") as? String
        let date = aDecoder.decodeObjectForKey("date") as? NSDate
        value = Event(uuid: uuid!, color: color!, date: date!)
