 }
 
 // MARK: UICollectionViewDataSource
-extension PGImageCarousel: UICollectionViewDataSource {
+private extension PGImageCarousel {
     public func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
         return self.images.count
     }


import UIKit

public class PGImageCarousel: UIView {
    // MARK: Outlets
    @IBOutlet fileprivate var contentView: UIView!
    @IBOutlet weak var imageCollectionView: UICollectionView!

    }
    
    // MARK: Helpers
    private func loadViewFromNib() {
        self.bundle.loadNibNamed(String(describing: type(of: self)), owner: self, options: nil)
        self.contentView.frame = self.bounds
        self.addSubview(self.contentView)
    }
    
    private func setupCollectionView() {
        self.registerCellNib()
        self.imageCollectionView.dataSource = self
        self.imageCollectionView.delegate = self
    }
    
    private func registerCellNib() {
        let imageCellNib = UINib(nibName: String(describing: PGImageCarouselCell.self), bundle: self.bundle)
        self.imageCollectionView?.register(imageCellNib, forCellWithReuseIdentifier: String(describing: PGImageCarouselCell.self))
    }
    
    private func resetCollection() {
        self.pageIndicator.numberOfPages = self.images.count / (self.gridSize * self.gridSize)
        self.pageIndicator.frame.size = self.pageIndicator.size(forNumberOfPages: self.pageIndicator.numberOfPages)
        self.imageCollectionView.reloadData()
