Added optional class for explicit destruction.