Merging changes; added addNode() function to given object.