add comment; add debug code in debug(), allow initial default for $debug
Merge commit 'github/testing' into beta