some refactoring
di container integration refactoring