Added a delete function to the BaseModel class.