Improved the TTY driver.

18 files changed