Simplify iteration in _createNode