Data.List.nub is O(n^2); replaced it with an equivalent O(n*log(n)) implementation.
Merge pull request #20 from kwf/master

Data.List.nub is O(n^2); replaced it with an equivalent O(n*log(n)) version