Refacotring of groups.