Refactoring2

not sure if resetTerminal() does not also reset other properties of the terminal