Levenshtein speed improvements

@bbalet good call. Hadn't looked to optimise this, but it's called a
lot. Saves about 30%. Close #1