                 if let dynamicLastCellHeight = self.dynamicLastCellHeight {
                     height = dynamicLastCellHeight
                     let currentPreviousRowFrame = tableView.rectForRow(at: IndexPath(row: indexPath.row - 1, section: indexPath.section))
-                    // Detect changes on tableView contents after dynamicLastCellHeight is set
+                    // Detect changes on tableView contents after dynamicLastCellHeight is set.
                     if currentPreviousRowFrame.maxY != previousRowFrame.maxY {
                         refreshDynamicLastCellHeight()
                     }
                 }
             } else {
                 previousRowFrame = tableView.rectForRow(at: IndexPath(row: indexPath.row - 1, section: indexPath.section))
-                // Get height of empty spaces to fill
+                // Get height of empty spaces to fill.
                 let availableHeight = tableView.frame.size.height - previousRowFrame.maxY
                 if availableHeight > lastCellIntrinsicHeight {
                     height = availableHeight

    }
    
    fileprivate func updateFillUsingLastCell() {
        // Set default dynamicLastCellHeight.
        dynamicLastCellHeight = intrinsicHeightCells
            ? UITableViewAutomaticDimension

        guard tableView.indexPathsForVisibleRows?.contains(lastCellIndexPath) ?? false
            else { return }
        previousRowFrame = tableView.rectForRow(at: IndexPath(row: lastCellIndexPath.row - 1, section: lastCellIndexPath.section))
        // Get height of empty spaces to fill.
        let availableHeight = tableView.frame.size.height - previousRowFrame.maxY
        if availableHeight.rounded() >= lastCellIntrinsicHeight {
            dynamicLastCellHeight = availableHeight
        }
    }
    
    fileprivate func refreshDynamicLastCellHeight() {
