Convert shared_ptr to unique_ptr.

The shared_ptr wasn't needed.