Clean up stepUnrollCtx function