Move funcs to toplevel.