performance improvements:

-memoized provider internals
-used singletons where possible