shrunk generated code size
improved code generation somewhat.  also added names to generated to functions