Refactoring and global removal