Add TPG functions to groups, modify existing code to use them.