Remove unneeded global variables

And small comment fixes.