Computing all the different sets of IDs.
Moved set computation to utils, so it can be ...

… used in tasks.