Refactor so the group's layout isn't passed in data-* attributes.