Added shared_ptr to type constructor