Refactored Grid Extractor