Factor out genThis().