Add compiler to avoid DI problems

Needs some tests.

And I warmly welcome any better namings for the compiler.