Add functions to copy nodes/edges