Copy infrastructure from adcollector