fixed DI and added type hint support