Simplify interface of Google examples and fix the name and comment of userName variable

What do you think about this change?