Small refactor to DOMAppender