Reformat the code
Simplify branching in the callbacks
NGXCBM-3 Add REPLACE/APPEND/PREPEND commands