Updated function runner to take an object with `context` and `params` keys instead of arguments in which the first argument is the context.