Added fn-with-params macro to wrap functions that require params.