More refactoring
Fixed src-test after refactoring
Added export menus to DistanceTerrainDialog