Use shared_ptr instead of unique_ptr at top level class