[Alt-tab] Refactoring: use accessors to reduce the number of duplicated variables.