CSPACE-6412: Change global variables to local.