Cleaning up entities