Changed widget-template to use replaceNode() to keep at least first node as the first new child node