Change variables which we (accidentally?) in the global scope into local...

... variables.