         return self.rowsAndSections[section].1.count
     }
 
-    public func value(atIndexPath indexPath: IndexPath) -> T {
+    public func value(atIndexPath indexPath: IndexPath) -> Value {
         return self.rowsAndSections[indexPath.section].1[indexPath.row]
     }
 
     // Since UICollectionView (unlike UITableView) takes a block which must update its data source and trigger animations, we need to trigger the changes on set, instead of explicitly before and after set. This backing array lets us use a getter/setter in the exposed property. TODO
-    public var rowsAndSections : SectionedValues<S, T> {
+    public var rowsAndSections : SectionedValues<Section, Value> {
         get {
             return _rowsAndSections
         }

    }
}

public class CollectionViewDiffCalculator<S: Equatable, T: Equatable> : AbstractDiffCalculator<S, T> {

    public weak var collectionView: UICollectionView?

    public init(collectionView: UICollectionView, initialRowsAndSections: SectionedValues<S, T> = SectionedValues()) {
        self.collectionView = collectionView
        super.init(initialRowsAndSections: initialRowsAndSections)
    }

    override func processChanges(newState: SectionedValues<S, T>, diff: [DiffStep2D<S, T>]) {
        guard let collectionView = self.collectionView else { return }
        self._rowsAndSections = newState
        collectionView.performBatchUpdates({

        return self.rowsAndSections.count
    }

    public func value(forSection: Int) -> Section {
        return self.rowsAndSections[forSection].0
    }

