Partitioned the dependency injection into multiple classes.