Wrapping to provide scope to avoid globals.