Up code coverage, simplify DI API and fix tests.