     func contentSizeForMode(_ mode: T2GLayoutMode) -> CGSize {
         var height: CGFloat = 0.0
         
-        if let dimensions = self.dataDelegate?.dimensionsForCell(mode) {
-            let viewX = mode == .collection ? dimensions.padding : (self.frame.size.width - dimensions.width) / 2
-            let divisor = self.itemCountPerLine(mode)
+        if let dimensions = dataDelegate?.dimensionsForCell(mode) {
+            let viewX = mode == .collection ? dimensions.padding : (frame.size.width - dimensions.width) / 2
+            let divisor = itemCountPerLine(mode)
             
             var lineCount = 0
-            for section in 0..<self.dataDelegate!.numberOfSections() {
-                lineCount += (Int(ceil(Double((self.dataDelegate!.numberOfCellsInSection(section) - 1) / divisor))) + 1)
+            for section in 0..<dataDelegate!.numberOfSections() {
+                lineCount += (Int(ceil(Double((dataDelegate!.numberOfCellsInSection(section) - 1) / divisor))) + 1)
             }
             lineCount -= 1
             
             let ypsilon = viewX + (CGFloat(lineCount) * (dimensions.height + dimensions.padding))
             height = ypsilon + dimensions.height + dimensions.padding + (CGFloat(dataDelegate!.numberOfSections()) * dataDelegate!.dimensionsForSectionHeader().height)
-            height = height < self.bounds.height ? (self.bounds.height - 31.0) : height
-        }
-        return CGSize(width: self.frame.size.width, height: height + 90)
+            height = height < bounds.height ? (bounds.height - 31.0) : height
+        }
+        return CGSize(width: frame.size.width, height: height + 90)
     }
     
     /**

    */
    func adjustContentSize(_ mode: T2GLayoutMode? = nil) {
        if let m = mode {
            self.contentSize = self.contentSizeForMode(m)
        } else {
            self.contentSize = self.contentSizeForMode(self.layoutMode)
        }
        if self.contentSize.height <= self.frame.height {
            self.contentSize = CGSize(width: self.frame.width, height: self.frame.height + 1)
        }
    }
    

    func performSubviewCleanup() {
        for view in subviews {
            if let cell = view as? T2GCell {
                if !bounds.intersects(cell.frame) || cell.alpha == 0 {
                    cell.removeFromSuperview()
                }
            } else if let delimiter = view as? T2GDelimiterView , !bounds.intersects(delimiter.frame) {
                delimiter.removeFromSuperview()
            }
        }
