     private var commandBuffer : MTLCommandBuffer?;
     private var computeCommandEncoder : MTLComputeCommandEncoder?;
     
-    private func prepareMetalForSurgery()
+    func preparePointCloud(completionHandler : (() -> Void)!)
     {
         let startTime = CACurrentMediaTime();
         

        self.computeCommandEncoder?.setBuffer(outputBuffer, offset: 0, atIndex: 1);
        self.computeCommandEncoder?.setBuffer(OSBaseFrame.calibrationMatrixBuffer, offset: 0, atIndex: 2);
        
        let threadGroupCountX = dataSize / 512;
        let threadGroupCount = MTLSize(width: threadGroupCountX, height: 1, depth: 1)
        let threadGroups = MTLSize(width:(dataSize + threadGroupCountX - 1) / threadGroupCountX, height:1, depth:1);

        
        self.computeCommandEncoder?.endEncoding();
        
        self.commandBuffer?.addCompletedHandler({[unowned self] (commandBuffer : MTLCommandBuffer) -> Void in
            let data = NSData(bytesNoCopy: outputBuffer.contents(), length: (self.pointCloud?.count)! * sizeof(OSPoint), freeWhenDone: false);
            data.getBytes(&self.pointCloud, length: outputByteLength);
            
            let elapsedTime : CFTimeInterval = CACurrentMediaTime() - startTime;
            print("Total process \(elapsedTime) seconds");
            
            completionHandler?();
        });
        
        self.commandBuffer?.commit();
    }
    
// MARK: OSContentLoadingProtocol

    static func loadContent(completionHandler : (() -> Void)!)
    {
