Revert "Correction in distance measures"

This reverts commit 3d7a9d984675771d84dd3713c0e8f28fb82f2647.
Revert "A few changes"

This reverts commit a7e11c6706671bffd230ef0c21b769cefb884585.
commit dist measure refactoring