Use the terminal class framework.