Tolerate trimming and insertions

Modified ED() to take the lowest five corner values of the matrix. Allows for insertion + trim to only count as 1 edit.