As for the other part of the question, it's common to put the underscore at the end of the variable name to not clash with anything internal.
I do this even inside classes and namespaces because I then only have to remember one rule (compared to "at the end of the name in global scope, and the beginning of the name everywhere else").