node.py: remove one unnecessary table join
node.py: minor optimizations