Refactoring for using components factory and constructor DI without strict relation on the IoC container