delete keys of no longer needed nodes