Term and group tests,

Cleaned up / corrected infinite recursion bugs