Fix performance and scalability issue by replacing a List remove() and contains() by a Set remove() and contains() + don't rely on equals/identity of entities