intermediate debugging, with gid errors now :(
intermediate hand-merge stage
BG: update from BB/wip branch without testing
ADD: parameters from BG branch; bringing the updates from BG to MP branch together