minor dependency injection refactoring