Dependency Injection and Unit Test Fixes