indexCopy unit test and less allocations
Merge pull request #103 from nicholas-leonard/indexCopy

indexCopy unit test and less allocations