Small improvements and better generated code documentation

Small improvements and better generated code documentation.