         return thumbnailRows * thumbnailCols
     }
 
-    private lazy var width: CGFloat = { return self.collectionView?.frame.width ?? 0 }()
-
-    private lazy var height: CGFloat? = {
-        return self.collectionView?.frame.height
-        }()
+    private var width: CGFloat
+    private var height: CGFloat
 
     // The width and height of the thumbnail here are the width and height of the tile itself, not the image inside the tile.
     private var thumbnailWidth: CGFloat {

    }

    override init() {
        super.init()
        setupForOrientation(UIApplication.sharedApplication().statusBarOrientation)
    }

    required init(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }

    private func transistionToOrientation(orientation: UIInterfaceOrientation, atSize size: CGSize) {
        setupForOrientation(orientation)
        height = size.height
        width = size.width

    private func setupForOrientation(orientation: UIInterfaceOrientation) {
        if orientation.isLandscape {
            thumbnailCols = 5
        } else if UIScreen.mainScreen().traitCollection.userInterfaceIdiom == .Pad  {
            thumbnailCols = 4
        } else {
            thumbnailCols = 3
        }
    }

