Render::main() now accepts a function.