Optimized Group.fixing.
Optimized subgroupSearch by using an explicit while loop.