Refactor CircuitBase to Circuit