         self.cellConfigurator = cellConfigurator
     }
 
-    ///  Creates and returns a new or dequeued `Cell` instance.
+    ///  Creates and returns a new `Cell` instance, or dequeues an existing cell for reuse.
     ///
     ///  :param: item           The model instance (data object) at `indexPath`.
     ///  :param: collectionView The collection view requesting this information.

    /// The type of `UICollectionReusableView` that the factory produces.
    typealias SupplementaryView: UICollectionReusableView

    ///  Creates annd returns a new or dequeued `SupplementaryView` instance.
    ///
    ///  :param: item           The model instance (data object) at `indexPath`.
    ///  :param: kind           An identifier that describes the type of the supplementary view.

}


///  A `CollectionSupplementaryViewFactory` is a concrete `CollectionSupplementaryViewFactoryType`.
///  This factory is responsible for producing and configuring supplementary views for a collection view for a specific data item.
public struct CollectionSupplementaryViewFactory <SupplementaryView: UICollectionReusableView, DataItem>: CollectionSupplementaryViewFactoryType {

    ///  Configures the supplementary view for the specified data item, collection view, and index path.
    ///
    ///  :param: SupplementaryView     The supplementary view to be configured at the index path.
    ///  :param: DataItem              The data item at the index path.
    ///  :param: SupplementaryViewKind An identifier that describes the type of the supplementary view.
    ///  :param: UICollectionView      The collection view requesting this information.
    ///  :param: NSIndexPath           The index path at which the supplementary view will be displayed.
    ///
    ///  :returns: The configured supplementary view.
    public typealias ConfigurationHandler = (SupplementaryView, DataItem, SupplementaryViewKind, UICollectionView, NSIndexPath) -> SupplementaryView

    /// A unique identifier that describes the purpose of the supplementary views that the factory produces.
    /// The factory dequeues supplementary views from the collection view with this reuse identifier.
    /// Clients are responsible for registering a view for this identifier and a supplementary view kind with the collection view.
    public let reuseIdentifier: String

    private let supplementaryViewConfigurator: ConfigurationHandler

    ///  Initializes and returns a new supplementary view factory.
    ///
    ///  :param: reuseIdentifier               The reuse identifier with which the factory will dequeue supplementary views.
    ///  :param: supplementaryViewConfigurator The closure with which the factory will configure supplementary views.
    ///
    ///  :returns: A new `CollectionSupplementaryViewFactory` instance.
    public init(reuseIdentifier: String, supplementaryViewConfigurator: ConfigurationHandler) {
        self.reuseIdentifier = reuseIdentifier
        self.supplementaryViewConfigurator = supplementaryViewConfigurator
    }

    ///  Creates and returns a new `SupplementaryView` instance, or dequeues an existing view for reuse.
    ///
    ///  :param: item           The model instance (data object) at `indexPath`.
    ///  :param: kind           An identifier that describes the type of the supplementary view.
    ///  :param: collectionView The collection view requesting this information.
    ///  :param: indexPath      The index path that specifies the location of the new supplementary view.
    ///
    ///  :returns: An initialized or dequeued `UICollectionReusableView` of type `SupplementaryView`.
    public func supplementaryViewForItem(item: DataItem, kind: SupplementaryViewKind,
                                         inCollectionView collectionView: UICollectionView, atIndexPath indexPath: NSIndexPath) -> SupplementaryView {
        return collectionView.dequeueReusableSupplementaryViewOfKind(kind, withReuseIdentifier: reuseIdentifier, forIndexPath: indexPath) as! SupplementaryView
    }

    ///  Configures and returns the specified supplementary view.
    ///
    ///  :param: view           The supplementary view to configure.
    ///  :param: item           The model instance (data object) at `indexPath`.
    ///  :param: kind           An identifier that describes the type of the supplementary view.
    ///  :param: collectionView The collection view requesting this information.
    ///  :param: indexPath      The index path that specifies the location of `view` and `item`.
    ///
    ///  :returns: A configured `UICollectionReusableView` of type `SupplementaryView`.
    public func configureSupplementaryView(view: SupplementaryView, forItem item: DataItem, kind: SupplementaryViewKind,
                                           inCollectionView collectionView: UICollectionView, atIndexPath indexPath: NSIndexPath) -> SupplementaryView {
        return supplementaryViewConfigurator(view, item, kind, collectionView, indexPath)
