Refactoring variables in ConsoleUI, Dialogs and main