Fix splitTextNode()
minor refactoring of variable names
Add documentation for dom.remove()