first step in tightening up the generated code
further simplifications to the generated wrappers.  The number of bsc warnings is down to the point where I can actually think about them