             case is DataType.Type:
                 return units[index] as! Element
             case is Tensor1D<DataType>.Type:
-                let newShape: Shape1D = arrayToShape(Array(dynamicShape.dimensions.dropFirst()))
-                let newUnits = ContiguousArray(units[getElementTensorRange(index: index)])
-                return Tensor1D<DataType>(shape: newShape, units: newUnits) as! Element
+                let elementShape: Shape1D = arrayToShape(Array(dynamicShape.dimensions.dropFirst()))
+                let elementUnits = getElementTensorUnits(index: index)
+                return Tensor1D<DataType>(shape: elementShape, units: elementUnits) as! Element
             case is Tensor2D<DataType>.Type:
-                let newShape: Shape2D = arrayToShape(Array(dynamicShape.dimensions.dropFirst()))
-                let newUnits = ContiguousArray(units[getElementTensorRange(index: index)])
-                return Tensor2D<DataType>(shape: newShape, units: newUnits) as! Element
+                let elementShape: Shape2D = arrayToShape(Array(dynamicShape.dimensions.dropFirst()))
+                let elementUnits = getElementTensorUnits(index: index)
+                return Tensor2D<DataType>(shape: elementShape, units: elementUnits) as! Element
             case is Tensor3D<DataType>.Type:
-                let newShape: Shape3D = arrayToShape(Array(dynamicShape.dimensions.dropFirst()))
-                let newUnits = ContiguousArray(units[getElementTensorRange(index: index)])
-                return Tensor3D<DataType>(shape: newShape, units: newUnits) as! Element
+                let elementShape: Shape3D = arrayToShape(Array(dynamicShape.dimensions.dropFirst()))
+                let elementUnits = getElementTensorUnits(index: index)
+                return Tensor3D<DataType>(shape: elementShape, units: elementUnits) as! Element
             default:
                 fatalError("Invalid element tensor type")
             }

    }
}


extension Tensor : RandomAccessCollection {
    public typealias Index = Int
    public typealias Element = ElementTensor

    }
}

public extension Tensor where R.Shape == Shape2D {
    fileprivate func getElementShape() -> Shape1D {
        return arrayToShape(Array(dynamicShape.dimensions.dropFirst()))
    }
}

/// - TODO: Add conditional expressibility conformance in Swift 4

public extension Tensor where R.DataType : Equatable {
