Implements delete function for model