Adding child element and textNode children functionality