Refactoring to move copied nodes to attribute groups