@ jmgdoc,
Thanks for the improvements. They should help everyone to have more readable code.
Unfortunately my code was the result of several tries as I got to understand the package, so it did not end up verey elegant. I should try and use the top level functions as much as possible.