use Sets instead of Lists

@williamboxhall The inputs/outputs shouldn't have duplicated elements and the order is not necessary.
Ohhhhhh. I'm an idiot. I thought traverse got changed, but clearly I did not look closely enough.

In that case, I think we should just use Iterable everywhere to allow flexibility of what you can pass to source.

Do I make sense this time? Haha I think I do :P