Invariants cleanup