Rewrote code to use Sets synchronized, instead of CopyOnWriteArrayList