Move slow function definition out of function so that they can be pickled, use better names.
Move slow function definition out of function so that they can be pickled, use better names.

ottogroup/dstoolbox,ottogroup/dstoolbox