Move resolver initialization into its own method
Make dependency resolver have the same thread-static tricks that the schedulers do