Refactoring global