Revert "don't use NodeFactory"

This reverts commit e5fb04721985051c48fa160c63eb2f9c22d76a61.