removed large amounts of group related code