Added Logging and Dependency Injection Support