Cleaning up Text styles (purge is not enoug)

This post shows how to do for System Families. I think your problem is that your to and from groups use a plain codeblock TextNote class name, not a family type. You have to plug in a familytype for this to work. Try using a TextNoteType.ByName node instead of the codeblock.