Generalize create_node() and use it in more places.