Changed the delete constructor and its test