Refactored to a ResourceProvider