I don't understand why we have to remove the previous one if it was there ? It's not possible to only append it where you want ? Remember that in DOM, if you appendChild an existing DOM Node, it automatically detach it from where it was.

If that works, then it would be a lot more efficient...