Convert to new contexts.
Some cleanup.