reworked mergeBetter and generation of the prefix or suffix. more tests.