Some variable refactoring