unique implementation

Implementation of unique, see #125. Could probably be improved performance wise, but at least it's there.