Change the main objects to use boost::shared_ptr

[#67930112]