Refactor completion of group and process names