Refactoring ShellUIPromptImpl