Changed the implementation of regular matching. Changed rCM to compute an almost-regular matching