Refactored and restructured IoC container