Refactor entlib provider for better performance.