Stop polluting global namespace by correctly scoping variables.