Refactor all the file. Need to be done: support a single entity delete.