Remove some dead code
Slightly simplify some of the code
Reduce the direction bits to lcs_lens