Refactored SpatialIndex to fix a memory leak.
Merge pull request #73 from lossyrob/mem-leak

Refactored SpatialIndex to fix a memory leak.