Clean up node allocation; no functional changes.