Changed autogen method to use text/template and used short receivers

text/template is easier to read, use and maintain than manual construction with strings.
This commit changes the autogen method. In the process, changes the receiver names to be
short to match up with go style convention