examples/appgroups.cf: improve logic and comments