Refactor out circuit to encapsulate historical traces