Now using unique_ptr instead of pointers.