Handles repetitions (cmp.txt, ibg.m and abg.m)