use Sets instead of Lists

@williamboxhall The inputs/outputs shouldn't have duplicated elements and the order is not necessary.
Good point, that would be more flexible. I believe it is possible to implement it using implicit ```CanBuildFrom``` parameters. It is a more complex solution, so I think we can merge this for now and work on it later.