Refactory & tidy DependencyInjector class