Did you try the merge vertices function? In the options, make the value .0001. It'll make vertices that are right on top of each other merge together.