Patched a null pointer exception when reading preferences.

Switched to useing a Set<> instead of NodeList of links from the index
page.