Recoded Group.pm for more performance (step 2).