Rough delete function, need to update linking tables