Use shared_ptr instead of the cumbersome struct->_impl
Fix up fake tree reader with shared ptrs