Refactoring destroying object.