Added support for constructor injection
Renamed init method to inject