refactoring: Use ‘std::unique_ptr’ where it makes sense.