Split out processing so we can batch-ify it.