Class for representing nodes in a tree