Make some Node fields private

This change also changes how functions are evaluated internally
(avoiding modifying the child list) and does some minor clean-up
of unused methods.

Change-Id: I7f36a77e644215a77950657ec02a5da2001076de