Change parameters passed to rand_func

It now passes the values in the domain that will base the interpolated
function, not only the number of points used.
Remove unused code