Added function to return an instance of a class from the IoC Container