Can't you just select the whole mesh and merge the vertices using MED?