First implementation of destructor