UniquePtr, interface classes for DLLs.
Moved UniquePtr uses out of APIs.