Reworked the word nodes to work in a graph.