refactor Dependency Injection related code, removed obsolete methods