[core] sort suggestions with distance of Damerau-Levenshtein + variables renaming