refactorName function

Method for refactoring the distance measurement name.