COM error handling, CLSIDFromString support, misc cleanup