Refactored ChainExtractor as a service with a CompilerPass