     fileprivate var rowViewModels = [[DataCellViewModel]]()
     fileprivate var paginationViewModel: PaginationHeaderViewModel!
     fileprivate var menuLengthViewModel: MenuLengthHeaderViewModel!
-    
+    fileprivate var columnWidths = [CGFloat]()
+
     //MARK: - Lifecycle
     public init(data: [[String]],
          headerTitles: [String],
          frame: CGRect = .zero)
     {
-        self.dataStructure = DataStructureModel(data: data, headerTitles: headerTitles)
+//        self.dataStructure = DataStructureModel(data: data, headerTitles: headerTitles)
         super.init(frame: frame)
-        self.createDataCellViewModels(with: self.dataStructure)
-        self.layout = SwiftDataTableFlowLayout(dataTable: self)
+        
+        self.set(data: data, headerTitles: headerTitles)
+        
         self.registerObservers()
         self.collectionView.reloadData()
     }

        collectionView.register(UINib(nibName: menuLengthIdentifier, bundle: podBundle), forSupplementaryViewOfKind: SupplementaryViewType.menuLengthHeader.rawValue, withReuseIdentifier: menuLengthIdentifier)
    }
    
    func set(data: [[String]], headerTitles: [String]){
        let dataStructure = DataStructureModel(data: data, headerTitles: headerTitles)
        self.createDataModels(with:dataStructure)
    }
    
    //MARK: - Events

        return 0
    }
    
    
    /// Automatically calcualtes the width the column should be based on the content
    /// in the rows under the column.
    ///
    /// - Parameter index: The column index
    /// - Returns: The automatic width of the column irrespective of the Data Grid frame width
    func automaticWidthForColumn(index: Int) -> CGFloat {
        let columnAverage: CGFloat = CGFloat(dataStructure.averageDataLengthForColumn(index: index))
        let sortingArrowVisualElementWidth: CGFloat = 20 // This is ugly
        let averageDataColumnWidth: CGFloat = columnAverage * self.pixelsPerCharacter() + sortingArrowVisualElementWidth
        return max(averageDataColumnWidth, max(self.minimumColumnWidth(), self.minimumHeaderColumnWidth(index: index)))
    }
//    func automaticWidthForAllColumns(){
//        let automaticCalculatedWidth: CGFloat = Array(0..<self.numberOfHeaderColumns())
//            .reduce(0.0){
//            return $0 + self.automaticWidthForColumn(index: $1)
//        }
//        
//        if automaticCalculatedWidth < self.collectionView.frame.width {
//            let emptyGap = self.collectionView.frame.width - automaticCalculatedWidth
//            
//        }
////        return automaticCalculatedWidth
//    }
    
    func widthForColumn(index: Int) -> CGFloat {
        return self.columnWidths[index]
    }
    
    func calculateContentWidth() -> CGFloat {
        return Array(0..<self.numberOfColumns()).reduce(self.widthForRowHeader()) { $0 + self.widthForColumn(index: $1)}
