ENH: moved some stuff to util.jl and closer on comb/perm method