Moved bad function only used in text nodes to node file.