Improved delete method.