Remove duplication of elements. Change append() to replaceWith().