Refactor to remove global variable