r159: fixed a typo in simplify

Should not really matter
r160: added a merging threshold