Adding routine to list attributes, variables, and groups (plus test).