TerrainProvider refactoring.