Move metadata extraction from extract.py to harvest.py