Fixed a pointer error where deep copies of structures were being passed to functions that searched for them by reference. This was causing problems where copies of the same pnode structure had different pointers but functions that searched for them relied on their pointer. I fixed this by adding a 'self' pointer to the pnode structure that stores the pointer of the structure itself, so when it gets copied, the original pointer remains. Then I modified the search functions to look at this 'self' pointer.