Added local variables in recursiveMath to be able to iteratively parse the groups.