Clean up use of get/setTextContent