Updated to the fact that IDs are lists now, not sets.