Slight improvement to NodeFactory