Refactor 'select_funs' (so they can be documented, used elsewhere)

This pulls the `select_funs` out of `select`, but just curries the `vars` argument down. This allows the functions to be documented more easily, and makes them available for other functions as well (and maybe useful for export later?)