Algorithm corrections, more unit tests

Added more unit tests and corrected some bugs in the Frequencies and
UniqueVals algorithms. Added a new variable for testing the
frequency-based algorithms.