Finished recursive version of EditDistance