Added api factory method to instantiate interfaces on runtime