improve code comments in DOM.parseTemplate