Changed the desctructors. There will be further changes to the destructors.