Changed search() to return caller's objects instead of temporary GraphNodes.