Refactor ScanProcessor