little refactoring of DI config and init