Removed some unneeded unique_ptr's.