Fixed singles and added triplet stuff

The program can now detect patterns of single or triplet possibilities
and adjust accordingly. Next I need to program to detect chains