         imageView.prepareForReuse()
     }
 }
-
-// MARK: - HeaderCell
-
-private final class HeaderCell: UICollectionViewCell {
-    override init(frame: CGRect) {
-        super.init(frame: frame)
-
-        let textView = UITextView()
-        if #available(iOS 13.0, *) {
-            textView.textColor = UIColor.label
-        } else {
-            textView.textColor = UIColor.black
-        }
-        textView.font = UIFont.systemFont(ofSize: 16)
-        textView.isEditable = false
-        textView.textAlignment = .center
-        textView.dataDetectorTypes = .link
-
-        contentView.addSubview(textView)
-        textView.frame = contentView.bounds
-        textView.autoresizingMask = [.flexibleHeight, .flexibleWidth]
-
-        textView.text = "Images by Florian de Looij\n http://flrngif.tumblr.com"
-    }
-
-    required init?(coder aDecoder: NSCoder) {
-        fatalError()
-    }
-}

        super.init(collectionViewLayout: UICollectionViewFlowLayout())
    }

    override func viewDidLoad() {
        super.viewDidLoad()

        collectionView?.register(HeaderCell.self, forCellWithReuseIdentifier: headerCellReuseId)
        collectionView?.register(AnimatedImageCell.self, forCellWithReuseIdentifier: imageCellReuseID)

        if #available(iOS 13.0, *) {

    }

    override func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
        let cell = collectionView.dequeueReusableCell(withReuseIdentifier: imageCellReuseID, for: indexPath) as! AnimatedImageCell
        cell.setImage(with: imageURLs[indexPath.row])
        return cell
    }

    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
        let layout = collectionViewLayout as! UICollectionViewFlowLayout
        let width = view.bounds.size.width - layout.sectionInset.left - layout.sectionInset.right
        return CGSize(width: width, height: width)
    }
}

private let imageCellReuseID = "imageCellReuseID"

// MARK: - Image URLs
