Move knowledge about definition of node types into the node