Did the same thing with segments -- seems like a 1s speedup everywhere, so that's neat.
Refactored unique to be more Object Oriented