Remove the use of a global variable in exchange for a global method.