Replaces ArrayList by HashSet to increase the performance

The removeAll() will use the contain method.
HashSet has a more efficient implementation of contains than ArrayList.