wip, testing and fixing do block semantics. refactoring confusing code about targetGroup and targetNodeName