Clean up.
Refactor node lookup.