Added function to add nodes to pastry