Extract method to add content to a node