Change neighbors from List<T> to HashSet<T>

Using a HashSet instead of a List has the benefit that it auto-
matically handles duplicates.