Eliminate runLength global variable, fix issue with preventing duplicates.