Almost finished extractor.py