Create factory methods for the three kinds of nodes and use them consistently -- missed a few cases.