Context and transformers work - 2

Continued from #1100.

Not ready for merge -- opened to ask questions on the code and get some reviews/feedback.
@dwightguth, can you help me understand how is this injected? This code works but I don't understand how. I was actually expecting this code to fail because I didn't write a provider for `Definition`.