Refactored ResourceExtractor