wip improvements to generate code to match dqt sources