Don't expose any globals and only modify when necessary