Refactored global variables