Add groups and contexts to the extract routine