Don't pass `$opt` to functions that don't use it

Functions used to use a `$opt` parameter to access the search options. In many cases they don't do that anymore (they use the global `$opt_...` variables instead). The `$opt` parameter is not necessary anymore in these cases and can be removed.