Removing the last of XEDECLARECLASS.
unique_ptr'ing things and removing some XECLEANUP.