Addresses issue #2925 .  I have changed things to use Function & func , ...

...and used default values of optional functions.  Also added some doxygen doco