Committing edit distance and alignment algorithm.