Owning raw pointers should be replaced with unique_ptr. I don't believe there is a need for shared_ptrs in the current implementation.