Small clanups:

Use static instead of anonymous namespace.
Delete write only variables.