Beginning of TrxGenerator.