         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> {
         get {
-            return internalRowsAndSections()
+            return _rowsAndSections
         }
         set {
             let oldRowsAndSections = rowsAndSections

    }
}

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

    public weak var collectionView: UICollectionView?

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

    // 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.
    private var _rowsAndSections: SectionedValues<S, T>
    public func internalRowsAndSections() -> SectionedValues<S, T> {
        return self._rowsAndSections
    }

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

            }
        }
    }


    fileprivate var _rowsAndSections: SectionedValues<S, T>
    fileprivate func processChanges(newState: SectionedValues<S, T>, diff: [DiffStep2D<S, T>]){
        fatalError("override me")
    }
}

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

    public weak var tableView: UITableView?

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

    /// You can change insertion/deletion animations like this! Fade works well. So does Top/Bottom. Left/Right/Middle are a little weird, but hey, do your thing.
    public var insertionAnimation = UITableViewRowAnimation.automatic, deletionAnimation = UITableViewRowAnimation.automatic

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