Refactor node_name usage