Nodes.py: code cleanup