Destructor for model class