Replace ground terms for new and old with functors