Fixed err variable name. Updated godoc visible names and comments.