Refactored MarchingCubes