Tree node implementation