Improved edit distance algorithm. Now takes into account the possibility of adjacent letters having their position swapped (a common typo)