Clean up of context building.