Initial commit for simplified custom functions
Further simplification
Move some custof_function helper types into namespace detail