ServiceFactory performance and framework integration improvements and fixes.