Allow change group ids, refactor to inject all ids at the top level.