Removing references to global  variable.