Refactored implementation of shared methods between TPG implementations