Refactoring. Adding IoC container