Updated to use new update_field_groups function