Adding code to create and add nodes to the current, left, and right nodes.