Speed improvements

Removed extra data (seenBy) in comparison and converted for loops to
list comprehensions.