update EditDistance
add SimplifyPath