Add Extractor and fix bugs