Called free on pointers for all nodes.
Made unsafe private.