Pull function creation out of the request.