   private func traverseOpenCells(closure: (position: CGPoint) -> Bool) -> Bool {
     var allTakenBefore = true
     var unboundIndex: UInt
-
+    
     switch scrollDirection {
     case .Vertical:
       unboundIndex = UInt(firstOpenSpace.y)
-
+      
     case .Horizontal:
       unboundIndex = UInt(firstOpenSpace.x)
     }
-
+    
     repeat {
       for boundIndex in 0..<maximumNumberOfCellsInBounds {
         var position = CGPointZero
-
+        
         switch scrollDirection {
         case .Vertical:
           position = CGPoint(x: CGFloat(boundIndex), y: CGFloat(unboundIndex))
-
+          
         case .Horizontal:
           position = CGPoint(x: CGFloat(unboundIndex), y: CGFloat(boundIndex))
         }
-
-
+        
+        
         if indexPathForPosition(position) != nil {
           continue
         }
-
+        
         if allTakenBefore {
           firstOpenSpace = position
           allTakenBefore = false
         }
-
+        
         if !closure(position: position) {
           // break
           return false
         }
       }
-
+      
       unboundIndex += 1
       
     } while(true)

        height: aCellSize.height * cellSize.height
      )
    }

    return result
  }

  private func sizeForCellAtIndexPath(indexPath: NSIndexPath) -> CGSize {
    if let cv = collectionView, let d = delegate {
      if d.respondsToSelector("collectionView:layout:sizeForItemAtIndexPath:") {
        return d.collectionView(cv, layout: self, sizeForItemAtIndexPath: indexPath)
      }
      }

    return CGSize(width: 1.0, height: 1.0)
  }

  private func positionForIndexPath(indexPath: NSIndexPath) -> CGPoint {
    let position: CGPoint
    // Check if the cell has a position
    if let p = positionByIndexPath[UInt(indexPath.section)]?[UInt(indexPath.row)] {
      position = p.CGPointValue()

    }

    else {
      // Make a new position if the position did not exist.
      insertCellsToIndexPath(indexPath)

      position = positionByIndexPath[UInt(indexPath.section)]?[UInt(indexPath.row)]?.CGPointValue()
        ?? CGPointZero
    }


    return position
  }

  private func indexPathForPosition(position: CGPoint) -> NSIndexPath? {
    let unboundIndex, boundIndex: Int

    switch scrollDirection {
    case .Vertical:
      unboundIndex = Int(position.y)
      boundIndex = Int(position.x)

    case .Horizontal:
      unboundIndex = Int(position.x)
      boundIndex = Int(position.y)
    }

    return indexPathByPosition[boundIndex]?[unboundIndex]
  }
}

  override func collectionViewContentSize() -> CGSize {
    let contentRect = UIEdgeInsetsInsetRect(collectionView!.frame, collectionView!.contentInset)
    let size: CGSize
    
    switch scrollDirection {
    case .Vertical:
      size = CGSize(
