                 y = 0
             }
 
-            var centerY = y + height / 2
-
-            let deviation = centerY / collectionViewHeight - 0.5
+            let deviation = (y + height / 2) / collectionViewHeight - 0.5
 
             if abs(nearestCenter.deviation) > abs(deviation) {
+                nearestCenter.row       = indexPath.row
                 nearestCenter.deviation = deviation
-                nearestCenter.cell = cell
             }
 
-            let cellInfo = (
+            let cellInfo: EventCellInfo = (
                 cell:      cell,
-                y:         centerY,
+                row:       indexPath.row,
                 height:    height,
                 deviation: deviation
             )

import Timepiece

class EventsCollectionViewController: UICollectionViewController {

    var calendar: Calendar!


        let collectionViewHeight = self.collectionView!.bounds.height
        let collectionViewY = self.collectionView!.frame.origin.y

        var cellInfos = [EventCellInfo]()
        var nearestCenter: (row: Int, deviation: CGFloat) = (0, CGFloat.infinity)

        for indexPath in visibleIndexPaths {
            let cell = self.collectionView!.cellForItemAtIndexPath(indexPath as! NSIndexPath)!
