Minor refactoring of vars