Fixed error in len and removed running duplicates

Fixed the error in the length and removed runing duplicates through the
use of sets.  Might be an error in minSlics