Modify ICR generation

Change Contexts and Sets to have only one parent and only
one context, respectively.  Updates code in response.