Adds CAL filter by num. gaps and mismatches
Improves the mapping quality function and updates SAM flags