It is possible to use circuit-retained without the rest of circuit if you want to use their implementation and that includes the cleanup logic. It's a bit tricky to figure out because you have to read through the source, but I think a recent release has made it a bit easier