 import Timepiece
 
 class EventsCollectionViewController: UICollectionViewController {
+
+    private typealias EventCellInfo = (cell: UICollectionViewCell!, row: Int, height: CGFloat, deviation: CGFloat)
 
     var calendar: Calendar!
 

        for cellInfo in cellInfos {
            cellInfo.cell.hidden = false

            if cellInfo.cell == nearestCenter.cell {
                cellInfo.cell.transform = CGAffineTransformMakeTranslation(20, 0)
            } else {
                cellInfo.cell.transform = CGAffineTransformMakeTranslation(0, 0)
            }

            UIView.animateWithDuration(0.3, animations: { () -> Void in
                // println(nearestCenter.deviation - y)
                // cell.transform = CGAffineTransformMakeTranslation(0, 100 * (cellInfo.deviation - nearestCenter.deviation))
            })
        }
    }
}

                y = 0
            }

            let deviation = (y + height / 2) / collectionViewHeight - 0.5

            if abs(nearestCenter.deviation) > abs(deviation) {
                nearestCenter.row       = indexPath.row
                nearestCenter.deviation = deviation
            }

            let cellInfo: EventCellInfo = (
                cell:      cell,
                row:       indexPath.row,
                height:    height,
                deviation: deviation
            )
