Start of logic for node types