Additional cleanup to nodeFactory code.