Hasty clean up. Sorry if there are some minor errors due to commenting things out.
Also mis-spoke, pNext is the next node.