Added dependency injection support