Simplify element removal

Without this commit, two different yet valid forms of removal were being
used depending on whether or not the element was a root_element. While
functional, it was over complicated for no reason.

This commit uses one common method of element removal from the document
tree.