Some cleanups in the extractor code.