Added better distance calc in Geomancer.

Massive refactoring job in DataIndexer.